From: Dan Magenheimer <dan.magenheimer@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Dmitry Torokhov <dtor@vmware.com>,
linux-kernel@vger.kernel.org, pv-drivers@vmware.com,
Avi Kivity <avi@redhat.com>
Subject: RE: [PATCH] VMware Balloon driver
Date: Mon, 5 Apr 2010 17:26:03 -0700 (PDT) [thread overview]
Message-ID: <ac1d8fae-d630-45ce-b2aa-84f850cdeda0@default> (raw)
In-Reply-To: <20100405163458.135fa319.akpm@linux-foundation.org>
> From: Andrew Morton [mailto:akpm@linux-foundation.org]
> Sent: Monday, April 05, 2010 5:35 PM
> To: Jeremy Fitzhardinge
> Cc: Dmitry Torokhov; linux-kernel@vger.kernel.org; pv-
> drivers@vmware.com; Avi Kivity; Dan Magenheimer
> Subject: Re: [PATCH] VMware Balloon driver
>
> On Mon, 05 Apr 2010 16:28:38 -0700
> Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
> > And is there some way to get the vm subsystem to provide
> backpressure:
> > "I'm getting desperately short of memory!"?
>
> Not really. One could presumably pull dopey tricks by hooking into
> slab shrinker registration or even ->writepage(). But cooking up
> something explicit doesn't sound too hard - the trickiest bit would be
> actually defining what it should do.
Sorry, I don't mean to be too self-serving. And I am far less
an expert in Linux mm code than others involved in this discussion.
But this backpressure metric is one thing that frontswap provides.
It also provides an "insurance policy" for "desperately short
of memory". It is the "yin" to the "yang" of cleancache.
If I understand the swap subsystem correctly, there IS NO
"getting desperately short of memory" except when a swap
device is unavailable or, more likely, too darn slow.
Frontswap writes synchronously to pseudo-RAM (tmem, in the
case of Xen) instead of a slow asynchronous swap device. It
hooks directly into swap_writepage()/swap_readpage() in
a very clean, well-defined (not dopey) way.
So -- I think -- it is a perfect feedback mechanism to
tell a balloon driver (or equivalent), "I need more memory"
while covering the short-term need until the balloon driver
(and/or hypervisor) can respond.
It works today with Xen, and Nitin Gupta is working on an
in-kernel memory compression backend for it. And Chris Mason
and I think it may also be a fine interface for SSD-used-
as-RAM-extension.
So please consider frontswap and cleancache before "cooking
up something [else] explicit"... these were previously part
of Transcendent Memory postings*, but I have revised them to
be more useful, well-defined, and standalone (from Xen/tmem)
and will be re-posting the revised versions soon.
Dan
* See:
http://lwn.net/Articles/340080/
http://lkml.indiana.edu/hypermail/linux/kernel/0912.2/01322.html
OLS 2009 proceedings
LCA 2010 proceedings
next prev parent reply other threads:[~2010-04-06 0:27 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-04 21:52 Dmitry Torokhov
2010-04-05 21:24 ` Andrew Morton
2010-04-05 22:03 ` Jeremy Fitzhardinge
2010-04-05 22:17 ` Andrew Morton
2010-04-05 22:26 ` Avi Kivity
2010-04-05 22:40 ` Andrew Morton
2010-04-05 23:01 ` Dmitry Torokhov
2010-04-05 23:03 ` Dan Magenheimer
2010-04-05 23:11 ` Andrew Morton
2010-04-05 23:28 ` Dmitry Torokhov
2010-04-06 16:28 ` Avi Kivity
2010-04-05 23:28 ` Jeremy Fitzhardinge
2010-04-05 23:34 ` Andrew Morton
2010-04-06 0:26 ` Dan Magenheimer [this message]
2010-04-06 16:30 ` Avi Kivity
2010-04-06 17:27 ` Dan Magenheimer
2010-04-06 23:20 ` Dave Hansen
2010-04-05 22:58 ` Dmitry Torokhov
2010-04-06 16:32 ` Avi Kivity
2010-04-06 17:06 ` Dmitry Torokhov
2010-04-06 17:42 ` Avi Kivity
2010-04-06 18:25 ` Jeremy Fitzhardinge
2010-04-06 18:36 ` Avi Kivity
2010-04-06 19:18 ` Jeremy Fitzhardinge
2010-04-08 5:30 ` Pavel Machek
2010-04-08 7:18 ` Avi Kivity
2010-04-08 17:01 ` Jeremy Fitzhardinge
2010-04-15 21:00 ` [PATCH v2] " Dmitry Torokhov
2010-04-21 19:59 ` Dmitry Torokhov
2010-04-21 20:18 ` Andrew Morton
2010-04-21 20:52 ` Dmitry Torokhov
2010-04-21 21:13 ` Andrew Morton
2010-04-22 0:09 ` Dmitry Torokhov
2010-04-21 23:54 ` Andrew Morton
2010-04-22 0:00 ` Dmitry Torokhov
2010-04-22 1:02 ` [Pv-drivers] " Dmitry Torokhov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ac1d8fae-d630-45ce-b2aa-84f850cdeda0@default \
--to=dan.magenheimer@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=avi@redhat.com \
--cc=dtor@vmware.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pv-drivers@vmware.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome