From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id 2111E1FF0E5 for ; Wed, 15 Jul 2026 12:34:33 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 884E52143E; Wed, 15 Jul 2026 12:34:32 +0200 (CEST) Message-ID: <072e03ce-a6be-4f32-b780-0f340a2f48a0@proxmox.com> Date: Wed, 15 Jul 2026 12:33:57 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH] kernel config: don't automatically enable kexec handover (KHO) To: Thomas Lamprecht , pve-devel@lists.proxmox.com References: <20260714124456.347992-1-d.csapak@proxmox.com> <1f8840f9-a651-41ff-b9f0-7c46fa26ed8b@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <1f8840f9-a651-41ff-b9f0-7c46fa26ed8b@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784111619878 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.332 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) KAM_SHORT 0.001 Use of a URL Shortener for very short URL RCVD_IN_DNSWL_LOW -0.7 Sender listed at https://www.dnswl.org/, low trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 2DQHVKVFMDDXDRX4PGG5OAWFHB34D2PT X-Message-ID-Hash: 2DQHVKVFMDDXDRX4PGG5OAWFHB34D2PT X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 7/15/26 12:25 PM, Thomas Lamprecht wrote: > Am 14.07.26 um 14:44 schrieb Dominik Csapak: >> CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT is enabled by default in the >> upstream ubuntu kernel config, but has a (probably) unintended >> side-effect: when KHO is automatically enabled, the kernel reserves >> scratch memory for the kernel handoff and marks it with MIGRATE_CMA to >> prevent non-movable allocations there. >> >> This causes unusual stats in /proc/meminfo, for example: >> >> CmaTotal: 0 kB >> CmaFree: - >> >> which looks nonsensical on the surface. It also reduces the available >> memory for e.g. guests with PCI passthrough, as pinner memory can't live >> in these areas. >> >> Since we don't use kexec handover by default, and it can still be >> enabled on the kernel commandline (kho=on), disable it by default to >> increase the available pinnable memory for guests. > > We really should evaluate that though, IMO this [0] is the dream, and > if it works, it might be used more compared to pcie passthrough. Yes, this sounds nice, and we should definitely look into that. Do you have any idea how far along that is? (is it already usable?) > > Also, is this actually reserved memory, or just mappings to have a > linear address space available, when needed? Ok my wording was a bit imprecise: it is memory marked such that anything that lives there can be moved away by the kernel. So with respect to 'pinned' memory, this is essentially unusable, which includes memory used for guests when using pci passthrough. (probably other use cases too) so it's not strictly 'reserved', but can't be used by some processes at all. hope that clears it up > > [0]: https://lwn.net/Articles/1033364/ > >> >> Signed-off-by: Dominik Csapak >> --- >> debian/rules.d/config-common.opts | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/debian/rules.d/config-common.opts b/debian/rules.d/config-common.opts >> index 64505b4..204bab4 100644 >> --- a/debian/rules.d/config-common.opts >> +++ b/debian/rules.d/config-common.opts >> @@ -68,3 +68,4 @@ >> -d CONFIG_N_GSM >> -d UBSAN_BOUNDS >> -e CONFIG_RUST >> +-d CONFIG_KEXEC_HANDOVER_ENABLE_DEFAULT >