Proposal to change page allocation to zero on free in the -virtual kernel

Philipp Kern pkern at
Sun Feb 17 22:35:07 UTC 2013


On Sun, Feb 03, 2013 at 08:28:40AM +0100, Peter Lieven wrote:
> This would be the best solution anyway. But wouldn't this also add
> performance overhead?

well, there are papers on how to do it without asking the guest
synchronously by letting it provide pages that can be dropped without
further interaction. See e.g. "repayment FIFO" in [0]. But that's

IBM implemented something like that on their System z platform with
Collaborative Memory Management[1].

> What I had in mind was using the zero-on-free page allocator only if
> inside a VM and if KSM is enabled on the host. In this case one would
> already have decided to trade in performance for memory.

I guess the only place to communicate the fact that KSM is enabled
(which can change, as KSM can be turned off and on by a sysctl) would be
the balloning driver. But even then I don't think you can be notified
of a sysctl change in an easy fashion. So qemu would need to query
something that's intended to be somewhat transparent. (Although qemu
needed to be adjusted to provide hints of memory areas to KSM through

Kind regards
Philipp Kern

[0] Miłoś et al., Satori: Enlightened page sharing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <>

More information about the ubuntu-devel mailing list