From: Cong Wang <cwang@multikernel.io>
To: kexec@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Cong Wang <xiyou.wangcong@gmail.com>
Subject: [ANNOUNCE] lazy_cma: Runtime contiguous memory allocator without boot-time reservation
Date: Wed, 11 Mar 2026 14:17:15 -0700 [thread overview]
Message-ID: <CAGHCLaTnT0ZEpWt3wRVBQD8RYuzWuMne1gPY-RvsYE4MqO3nAw@mail.gmail.com> (raw)
Hi all,
I'd like to announce lazy_cma, an out-of-tree kernel module that provides
runtime contiguous memory allocation without requiring any boot-time
reservation.
Anyone who has managed crashkernel= across a fleet knows the pain:
pick a size too small and kdump fails with OOM during boot, pick it
too large and you waste memory on every node. The reservation is set
at boot, so changing it means draining the machine and rebooting.
On heterogeneous memory systems (CXL, PMEM) the problem gets worse
because those ranges are onlined post-boot via dax/kmem and cannot
participate in CMA at all.
The same pain applies to any use case that needs physically contiguous
memory: you must commit to a size in the bootloader before you know
what the workload actually requires.
The tradeoff is that CMA guarantees success from its reserved region,
while lazy_cma is best-effort and may fail on heavily fragmented systems.
In practice it works well when sufficient free memory is available, e.g.
right after boot before the workload has started.
Key features:
- Allocate/resize/free contiguous memory at runtime via /dev/lazy_cma
- Allocations registered in /proc/iomem with custom names
- NUMA node selection for CXL/PMEM
Target use cases:
- Kdump: reserve crash kernel memory at runtime without the crashkernel=
boot parameter (see also lazy_kdump in the same repo)
- DAXFS: allocate physically contiguous backing memory based on
different images
- Multikernel: carve out physically contiguous memory pool for spawn kernels
Source code: https://github.com/multikernel/lazy_cma
For more details, see the blog post:
https://multikernel.io/2026/03/08/introducing-lazy-cma/
Thanks,
Cong
reply other threads:[~2026-03-11 21:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAGHCLaTnT0ZEpWt3wRVBQD8RYuzWuMne1gPY-RvsYE4MqO3nAw@mail.gmail.com \
--to=cwang@multikernel.io \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=xiyou.wangcong@gmail.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