|| ||Dan Magenheimer <dan.magenheimer-AT-oracle.com> |
|| ||Avi Kivity <avi-AT-redhat.com> |
|| ||RE: Frontswap [PATCH 0/4] (was Transcendent Memory): overview |
|| ||Sun, 25 Apr 2010 06:12:47 -0700 (PDT)|
|| ||linux-kernel-AT-vger.kernel.org, linux-mm-AT-kvack.org, jeremy-AT-goop.org,
hugh.dickins-AT-tiscali.co.uk, ngupta-AT-vflare.org, JBeulich-AT-novell.com,
dave.mccracken-AT-oracle.com, npiggin-AT-suse.de, akpm-AT-linux-foundation.org,
|| ||Article, Thread
> On 04/25/2010 03:41 AM, Dan Magenheimer wrote:
> >>> No, ANY put_page can fail, and this is a critical part of the API
> >>> that provides all of the flexibility for the hypervisor and all
> >>> the guests. (See previous reply.)
> >> The guest isn't required to do any put_page()s. It can issue lots
> >> them when memory is available, and keep them in the hypervisor
> >> Failing new put_page()s isn't enough for a dynamic system, you need
> >> be able to force the guest to give up some of its tmem.
> > Yes, indeed, this is true. That is why it is important for any
> > policy implemented behind frontswap to "bill" the guest if it
> > is attempting to keep frontswap pages in the hypervisor forever
> > and to prod the guest to reclaim them when it no longer needs
> > super-fast emergency swap space. The frontswap patch already
> > the kernel mechanism to enable this and the prodding can be
> > by a guest daemon (of which there already exists an existence proof).
> In this case you could use the same mechanism to stop new put_page()s?
You are suggesting the hypervisor communicate dynamically-rapidly-changing
physical memory availability information to a userland daemon in each guest,
and each daemon communicate this information to each respective kernel
to notify the kernel that hypervisor memory is not available?
Seems very convoluted to me, and anyway it doesn't eliminate the need
for a hook placed exactly where the frontswap_put hook is placed.
> Seems frontswap is like a reverse balloon, where the balloon is in
> hypervisor space instead of the guest space.
That's a reasonable analogy. Frontswap serves nicely as an
emergency safety valve when a guest has given up (too) much of
its memory via ballooning but unexpectedly has an urgent need
that can't be serviced quickly enough by the balloon driver.
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to firstname.lastname@example.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"email@example.com"> firstname.lastname@example.org </a>
to post comments)