You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Give memory back automatically: a page_reporting driver for UML #506
The second half of #505. The mconsole balloon is landed and works, but it is a knob: a test has to call drop_caches() and then shrink(), and it only takes pages that are already free.
CONFIG_PAGE_REPORTING is generic mm and arch-independent. A driver in arch/um that registers a page_reporting_dev_info and calls os_drop_memory on each scatterlist entry gives the same effect continuously and with no host orchestration -- the guest reports free blocks as it frees them, and growing back is free because the memory file is sparse. That is what virtio-balloon's free-page-reporting rides on, minus the virtio.
Shape of the work:
~80 lines in arch/um/drivers, carried as a patch in pkgs/uml-kernel until it is upstream.
Check PAGE_REPORTING_MIN_ORDER against pageblock_order: reporting is per high-order block, 2 MiB on x86, so it will not reclaim a scattered page cache the way shrink does after drop_caches. The two are complementary, not one replacing the other.
The syscall stub page is written into the memory file at boot and mapped into every guest process. Confirm it is reserved and can never reach a free list.
tests/memory.py already measures both sides. The new assertion is that host_memory_kib() falls on its own after the guest frees memory, with nothing called.
Upstream-shaped work. Consult before anything goes to the UML list.
Activity