On Tuesday, November 3rd, 2026 at 4:29 PM, David Hildenbrand (Arm)
<[email protected]> wrote:
> Care to pitch the use case to me?
Sure! The point of my project is better control over guest memory.
Each VM boots as small as possible. An agent in the guest throttles the
workload with memory.high before it OOMs and asks a daemon on the host
for more, the daemon grants it (or not) by resizing the virtio-mem
device, and the guest gives it back once it no longer needs it.
>From there, one can set up VM priorities, revocation policies, etc etc.
> Is this something that your use case would actually benefit from,
> or was that project already discarded?
It is live, though on my own server for now, and nowhere near
datacenter scale. It's a 32 GiB box running two VMs, a CI runner and a
game server node.
Each used to have a static 32 GiB with a balloon because both workloads
could potentially use up to that much memory.
At the ceiling, the memmap for 30 GiB is about 480 MiB in the kernel
zones of a 2 GiB VM, on top of up to about 360 MiB of other unmovable
memory.
> Why so much MOVABLE memory,
Have you seen RAM prices lately? :)
In more seriousness, giving memory back only works if unplugging
reliably succeeds, so hotplugged memory is onlined movable.
Onlining some of it to the kernel zones, as auto-movable would, makes
that part hard to unplug again.
> and how do other kernel allocations (page tables etc) cope with
> that?
On said VMs, page tables peaked at 75 MiB, and page tables,
unreclaimable slab, kernel stacks, and percpu memory together at about
360 MiB. They scale with the workload, while memmap scales with the
plugged size, which is why I started with it.
The other problem I hit was inodes. Their page cache ends up in
ZONE_MOVABLE, which reclaim for kernel allocations does not scan, so
they pile up in the kernel zones. In testing with 1 GiB of boot memory,
that meant OOM kills and usually a panic. Working on it turned up two
inode LRU bugs, which are now in 7.4-rc1:
8dc4116041e2 ("fs: don't lose inodes that another LRU walker is isolating")
8ee09f597763 ("fs: rotate inodes whose page cache could not be dropped")
I have a series for the pinning itself that I'll post separately.
My VMs have been running with all mentioned patches (with some minor
tweaks) applied for some 5 weeks.
Thanks!
Nikolaos