From: Dominik Csapak <d.csapak@proxmox.com>
To: Thomas Lamprecht <t.lamprecht@proxmox.com>, pve-devel@lists.proxmox.com
Subject: Re: [PATCH] kernel config: don't automatically enable kexec handover (KHO)
Date: Wed, 15 Jul 2026 12:33:57 +0200 [thread overview]
Message-ID: <072e03ce-a6be-4f32-b780-0f340a2f48a0@proxmox.com> (raw)
In-Reply-To: <1f8840f9-a651-41ff-b9f0-7c46fa26ed8b@proxmox.com>
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 <d.csapak@proxmox.com>
>> ---
>> 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
>
prev parent reply other threads:[~2026-07-15 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-14 12:44 [PATCH] kernel config: don't automatically enable kexec handover (KHO) Dominik Csapak
2026-07-15 8:12 ` Dominik Csapak
2026-07-15 10:25 ` Thomas Lamprecht
2026-07-15 10:33 ` Dominik Csapak [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=072e03ce-a6be-4f32-b780-0f340a2f48a0@proxmox.com \
--to=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
--cc=t.lamprecht@proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox