[ANNOUNCE] lazy_cma: Runtime contiguous memory allocator without boot-time reservation
Cong Wang
cwang at multikernel.io
Wed Mar 11 14:17:15 PDT 2026
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
More information about the kexec
mailing list