Re: [patch 0/6] Guest page hinting version 6.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrea Arcangeli
Date: Thursday, March 13, 2008 - 12:45 pm

On Thu, Mar 13, 2008 at 10:45:07AM -0700, Zachary Amsden wrote:

With non-paravirt all you can do is to swap the guest physical memory
(mmu notifiers allows linux to do that) or share memory (mmu notifiers
+ ksm allows linux to do that too). We also have complex working set
algorithms that we use to finds which parts of the guest physical
address space are best to swap first: the core linux VM.

What paravirt allows us to do (and that's the whole point of the paper
I guess), is to go one step further than just guest swapping and to
ask the guest if the page really need to be swapped or if it can be
freed right away. So this would be an extension of the mmu notifiers
(this also shows how EMM API is too restrictive, while MMU notifiers
will allow that extension in the future) to avoid I/O sometime if
guest tells us it's not necessary to swap through paravirt ops.

When talking with friends about ballooning I already once suggested to
auto inflate the balloon with pages in the freelist.

Now this paper goes well beyond the pages in the freelist (called
U/unused in the paper), this also covers cache and mapped-clean cache
in the guest. That would have been the next step.

Anyway plain ballooning remains useful as rss limiting or numa
compartments in the linux hypervisor, to provide unfariness to certain
guests.

I didn't read the patch yet, but I think paravirt knowledge about
U/unused pages is needed to avoid guest swapping. The cache and mapped
cache in the guest is a gray area, because linux as hypervisor will be
extremely efficient at swapping out and swapping in the guest cache
(host swapping guest cache, may be faster than re-issuing a read-I/O
to refill the cache by itself, clearly with guest using
paravirt). Let's say I'm mostly interested about page-hinting for the
U pages initially.

I'm currently busy with other two features and trying to get mmu
notifier #v9 into mainline which is orders of magnitude more important
than avoiding a few swapouts sometime (without mmu notifiers
everything else is irrelevant, including guest page hinting and
including ballooning too cause madvise(don't need) won't clear sptes
and invalidate guest tlbs).
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 0/6] Guest page hinting version 6., Martin Schwidefsky, (Wed Mar 12, 6:21 am)
Re: [patch 0/6] Guest page hinting version 6., Rusty Russell, (Wed Mar 12, 3:41 pm)
Re: [patch 0/6] Guest page hinting version 6., Martin Schwidefsky, (Thu Mar 13, 2:47 am)
Re: [patch 0/6] Guest page hinting version 6., Hugh Dickins, (Thu Mar 13, 9:57 am)
Re: [patch 0/6] Guest page hinting version 6., Martin Schwidefsky, (Thu Mar 13, 10:14 am)
Re: [patch 0/6] Guest page hinting version 6., Zachary Amsden, (Thu Mar 13, 10:45 am)
Re: [patch 0/6] Guest page hinting version 6., Jeremy Fitzhardinge, (Thu Mar 13, 11:41 am)
Re: [patch 0/6] Guest page hinting version 6., Hugh Dickins, (Thu Mar 13, 11:55 am)
Re: [patch 0/6] Guest page hinting version 6., Andrea Arcangeli, (Thu Mar 13, 12:45 pm)
Re: [patch 0/6] Guest page hinting version 6., Zachary Amsden, (Thu Mar 13, 12:53 pm)
Re: [patch 0/6] Guest page hinting version 6., Zachary Amsden, (Thu Mar 13, 2:41 pm)
Re: [patch 0/6] Guest page hinting version 6., Jeremy Fitzhardinge, (Fri Mar 14, 11:30 am)
Re: [patch 0/6] Guest page hinting version 6., Zachary Amsden, (Fri Mar 14, 2:32 pm)
Re: [patch 0/6] Guest page hinting version 6., Jeremy Fitzhardinge, (Fri Mar 14, 2:37 pm)
Re: [patch 0/6] Guest page hinting version 6., Martin Schwidefsky, (Mon Mar 17, 2:21 am)
Re: [patch 0/6] Guest page hinting version 6., Martin Schwidefsky, (Tue May 6, 8:33 am)
Re: [patch 0/6] Guest page hinting version 6., Rik van Riel, (Tue May 6, 12:46 pm)
Re: [patch 0/6] Guest page hinting version 6., Zachary Amsden, (Tue May 6, 8:49 pm)
Re: [patch 0/6] Guest page hinting version 6., Martin Schwidefsky, (Wed May 7, 12:00 am)