FR
live

Linux 7.4 makes hot-adding memory to VMs and CXL up to 81% faster

A patch series by Yuan Liu (Intel), queued in mm/core.git ahead of the Linux 7.4 merge window, replaces page-by-page zone scans with an optimized contiguity check. Measured: up to 81% less time to hot-add memory to a VM and 75% to hot-remove it, with Samsung also reporting CXL gains.

A memory module halfway into an empty DIMM slot on a dark server motherboard, a single amber status LED glowing on the board.

September 27, 2026. Michael Larabel documents on Phoronix a memory-hotplug optimization being prepared for Linux 7.4. September 27, 2026. Yuan Liu, an engineer at Intel, leads the rewrite of the zone-contiguity checks that were slowing down adding RAM. October 2026. The merge window for Linux 7.4, where the patch series — already queued in mm/core.git — is expected to land. Why it matters: hot-adding memory — on a virtual machine or over CXL — becomes up to 81% faster, a gain that lands directly on cloud elasticity.

Adding memory without a reboot

Memory hotplug is the kernel’s ability to absorb additional RAM while the system is running, with no reboot. Two use cases make it strategic. The first is virtualization: QEMU and KVM can grow a guest’s memory at runtime, and that is the mechanism cloud providers use to move a server from one size to another without powering it down. The second is CXL (Compute Express Link), which lets you attach memory-expansion modules — or even compose memory across machines — the way you would plug in a device.

In both cases the kernel path is the same. The system must discover new physical ranges, carve them into page blocks, verify they are usable, then bring them online into the allocator. It is in that online sequence that the bottleneck was hiding.

The bottleneck: verifying a zone’s contiguity, page by page

Before bringing a range online, the kernel must establish the contiguity of the memory in question. A memory zone is organized into page blocks — units of several pages — and hot-adding requires determining which portions are genuinely contiguous and free. The historical approach proceeded by scanning page block by page block across an entire zone, an operation whose cost grows with the size of the zone, not with the amount of memory being added.

The consequence: adding a little memory to a large zone was expensive, because the check walked the whole zone rather than just the range in play. That is exactly the kind of cost nobody notices while machines stay small, but which becomes measurable once zones reach hundreds of gigabytes — the typical case for virtualization hosts and CXL infrastructure.

What Yuan Liu’s series changes

The patch series led by Yuan Liu targets those zone-contiguity checks. Its purpose, as described in the cover letter, is to optimize these checks to avoid page-block-by-page-block scans across an entire zone. In practice, the work stops the kernel from walking the whole zone when only a portion is being added, and refocuses the verification on what the new range actually needs.

The patches are already queued in the for-next branch of mm/core.git — the tree where memory-management changes land ahead of a merge window. The reference commit carries the identifier fa4df92e3d18e2428d7313350350de21824e183d, and its presence in for-next means it is expected to be merged for Linux 7.4, whose window opens in October.

The numbers: up to 81% on a VM, plus CXL gains

The measurements published with the series match the problem. On a virtual machine, hot-adding memory sees its time cut by 81%, and hot-removing it by 75%. Both directions of elasticity — growing and shrinking — benefit, which matters for platforms that do automatic right-sizing.

Samsung ran complementary tests on CXL and found “sizable” improvements for hot-plugging memory over CXL, according to Phoronix. That is the second strategic use case getting faster: attaching expansion memory to a machine becomes cheaper, moving CXL closer to routine production use.

Why it matters in production

Memory hotplug is a fixed cost of elasticity. Every time a VM changes size, every time a CXL module is attached, the kernel pays the price of the contiguity check. Cutting that price by 81% changes no application, but it speeds up the infrastructure operations that repeat thousands of times a day in a datacenter.

For teams running KVM or CXL, the change arrives with Linux 7.4, and therefore in future distributions — not the current stable kernels, where Ubuntu 26.10 ships Linux 7.3. Checking that memory hotplug is enabled on a machine takes just two commands:

bash
grep -E 'CONFIG_MEMORY_HOTPLUG' /boot/config-$(uname -r)
ls /sys/devices/system/memory/

The change lands in a memory subsystem that has been iterating hard. The same week, the slab allocator gained a patch that lets it refill its per-CPU sheaves from the barn rather than partial slabs, lifting a saturation that slowed kfree_rcu() — a reminder that the cheapest kernel performance increasingly comes from deleting scans and lock contention on hot paths, not from adding features. Yuan Liu’s work follows the same logic: it removes work rather than adding cleverness. For operators, that is the tell-tale sign of a change worth tracking — the kind that shows up as lower CPU on infrastructure nobody benchmarks, then quietly becomes the baseline. Operators on stable kernels inherit the win eventually; the ones running memory-hungry workloads will notice it first. For now this is a patch to watch rather than one to backport — but the direction is set.

CXL: memory that plugs in like a device

CXL changes what memory is. Where a server’s RAM was a fixed resource, soldered to the board and sized once, CXL makes it composable: memory-expansion modules plug into a connector and expose their ranges to the processor as system memory. Hotplug then becomes the daily operation — attach, detach, resize — rather than the exception reserved for maintenance windows.

That is why the gain Samsung measured on CXL matters as much as the virtual-machine result. Attaching a CXL module goes through the same online path as adding RAM to a VM: discover the ranges, carve them into page blocks, verify contiguity, then bring them online. If that verification walks the whole zone, the cost of attachment grows with the size of the zone already online — exactly what would keep CXL unattractive beyond demos. Yuan Liu’s series removes that brake.

Over time the stakes go beyond raw speed. Memory you can attach and detach at will, without penalty, is the missing piece for composability: allocating memory on demand across machines, following load, instead of over-provisioning it everywhere. Fast hotplug is therefore not just a comfort optimization — it is a precondition for the memory architecture of the next decade.

Verdict

If you run virtualization hosts or CXL, treat this series as a zero-cost infrastructure win — no interface change, no configuration to adapt, a measured benefit in both directions of elasticity. If you follow development kernels, test the fix against your own hot-add and hot-remove sequences: the 81% and 75% figures are orders of magnitude, and your workloads will pin down the reality. If CXL and hot-plug virtualization are not your world, the lesson is elsewhere: kernel performance increasingly lives in fine-grained memory management, and a page-by-page scan nobody thought about becomes, at modern zone sizes, the bottleneck nobody was looking for. Cloud elasticity just got faster by one patch — the kind of fix that never makes the front page, but makes everything else smoother. The mm subsystem has made this its default direction — one scan removal at a time.

References

The cyber brief, every Tuesday

The flaws that matter and the patches to apply, in a ten-minute read.

No spam. One-click unsubscribe.
read next

On the same topic

Toolpak wants to do for developer tools what Flatpak did for apps

On 26 September 2026, GNOME developer Jordan Petridis introduced Toolpak, a Flatpak-inspired format for shipping strace, ripgrep, and qemu on image-based systems without breaking them. For anyone working on Silverblue or GNOME OS, it fills the gap immutable distributions never closed.

The Linux kernel considers an AGENTS.md to rein in patches generated by AI agents

On September 24, 2026, maintainer Sasha Levin proposed adding an AGENTS.md file to the Linux kernel repository to fix attribution mistakes made by AI agents that generate patches. The proposal, debated on LKML, raises a real question: steer agents with a single file or with purpose-built documentation.

← Back to the feed

Type at least two characters.

↑ ↓ navigate ↵ open esc dismiss