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

Peter Lieven lieven-lists at dlhnet.de
Sun Feb 3 07:28:40 UTC 2013


Philipp Kern wrote:
> Peter,
>
> am Mon, Jan 28, 2013 at 09:45:46AM +0100 hast du folgendes geschrieben:
>> I would like to know if it would be a good idea to change the page
>> allocator
>> zeroing > policy from zero on allocate (for GFP_USER) to zero on free
>> for the
>> -virtual > kernel builds.
>
> wouldn't it be better to signal the host that the page in question can be
> discarded? If the guest really needs to hand out the page and not the
> mapping to the zeroed frame it keeps anyway, it seems like a disadvantage
> to have a CoW breaking on the host immediately afterwards.

This would be the best solution anyway. But wouldn't this also add
performance overhead?

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.

Peter

>
> Live migration wouldn't need to copy such pages and instead of applying
> memory
> scanning and merging on those pages they could simply be reassigned to
> another
> process by the host on memory pressure.
>
> The pages would probably need to get part of the balloon that's used to
> dynamically change memory size, potentially with some additional
> signalling
> which pages are likely to still be allocated to the guest and a way to
> leave
> them in the free pool.
>
> Kind regards
> Philipp Kern
> --
> ubuntu-devel mailing list
> ubuntu-devel at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel
>





More information about the ubuntu-devel mailing list