From: "Mike Rapoport (Microsoft)" <rppt@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>, Mike Rapoport <rppt@kernel.org>,
Pasha Tatashin <pasha.tatashin@soleen.com>,
Pratyush Yadav <pratyush@kernel.org>
Cc: Alexander Graf <graf@amazon.com>,
Andrew Morton <akpm@linux-foundation.org>,
Chen Pei <cp0613@linux.alibaba.com>,
George Guo <guodongtai@kylinos.cn>,
Kexin Liu <liukexin@kylinos.cn>,
Randy Dunlap <rdunlap@infradead.org>,
Shuah Khan <skhan@linuxfoundation.org>,
Sourabh Jain <sourabhjain@linux.ibm.com>,
kexec@lists.infradead.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
"Jose A. Perez de Azpillaga" <azpijr@gmail.com>,
Mukesh Pilaniya <mpilaniy@redhat.com>
Subject: [PATCH v3 0/5] kho: fix bootmem sizing
Date: Thu, 12 Nov 2026 12:38:52 +0200 [thread overview]
Message-ID: <20261112-kho-bootmem-sizing-v3-0-f0c8d00295d5@kernel.org> (raw)
There were several reports about issues with KHO bootmem sizing.
The bootmem areas are sized from overlapping views of the memory reserved
in memblock, so on NUMA systems memory allocated on a node is accounted
twice and with CONFIG_NUMA=n the lowmem and the global areas are accounted
once again in the area of node 0. Besides, the lowmem and the global areas
are reserved even when they are empty.
The first patch rejects kho_bootmem=0% that leaves KHO enabled without
usable bootmem.
The second patch makes kexec walk the bootmem areas in address order.
Otherwise kexec on arm64 may fail if a small area at the top of the memory
is the first in the list, and with smaller bootmem areas this becomes more
likely.
The third patch skips empty bootmem areas, the fourth one makes the
lowmem, per-node and global areas cover separate parts of the reserved
memory and the last one updates the documentation.
---
Changes in v3:
- add a patch that rejects kho_bootmem=0%
- set exact_nid in kho_reserve_bootmem_area() only for a valid node
(Mukesh)
- free bootmem areas in forward order on error
- add braces around multi-line for_each_node_state() body (Pasha)
- add a patch that updates the bootmem documentation (Mukesh)
- Link to v2: https://patch.msgid.link/20261104-kho-bootmem-sizing-v2-0-b0d1a834780f@kernel.org
Changes in v2:
- add a patch that walks bootmem areas in address order
- update kho_bootmem_cnt directly in kho_reserve_bootmem_area() (Pratyush)
- don't reserve the lowmem area if ARCH_LOW_ADDRESS_LIMIT covers all
memory (Pratyush)
- extend the comment above bootmem_size_update() (Pratyush)
- Link to v1: https://patch.msgid.link/20261103-kho-bootmem-sizing-v1-0-45aa74098f34@kernel.org
---
Mike Rapoport (Microsoft) (5):
kho: reject zero bootmem scale
kho: walk bootmem areas in address order
kho: skip zero-sized lowmem and global bootmem areas
kho: fix bootmem sizing
kho: docs: update description of bootmem regions
Documentation/core-api/kho/index.rst | 31 +++--
kernel/liveupdate/kexec_handover.c | 225 +++++++++++++++++++++--------------
2 files changed, 158 insertions(+), 98 deletions(-)
---
base-commit: 6628e7d4c6b25c8d18f1345e3a20d21829aae7e4
change-id: 20261103-kho-bootmem-sizing-5d6aed47a243
--
Sincerely yours,
Mike.
next reply other threads:[~2026-11-12 10:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 10:38 Mike Rapoport (Microsoft) [this message]
2026-11-12 10:38 ` [PATCH v3 1/5] kho: reject zero bootmem scale Mike Rapoport (Microsoft)
2026-11-12 10:38 ` [PATCH v3 2/5] kho: walk bootmem areas in address order Mike Rapoport (Microsoft)
2026-11-12 10:38 ` [PATCH v3 3/5] kho: skip zero-sized lowmem and global bootmem areas Mike Rapoport (Microsoft)
2026-11-12 10:38 ` [PATCH v3 4/5] kho: fix bootmem sizing Mike Rapoport (Microsoft)
2026-11-12 10:38 ` [PATCH v3 5/5] kho: docs: update description of bootmem regions Mike Rapoport (Microsoft)
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=20261112-kho-bootmem-sizing-v3-0-f0c8d00295d5@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=azpijr@gmail.com \
--cc=corbet@lwn.net \
--cc=cp0613@linux.alibaba.com \
--cc=graf@amazon.com \
--cc=guodongtai@kylinos.cn \
--cc=kexec@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liukexin@kylinos.cn \
--cc=mpilaniy@redhat.com \
--cc=pasha.tatashin@soleen.com \
--cc=pratyush@kernel.org \
--cc=rdunlap@infradead.org \
--cc=skhan@linuxfoundation.org \
--cc=sourabhjain@linux.ibm.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
all inboxes | Powered by JetHome®