public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: memory hotplug for guests?
Date: Thu, 5 Apr 2007 14:28:16 +0200	[thread overview]
Message-ID: <200704051428.17198.arnd@arndb.de> (raw)
In-Reply-To: <64F9B87B6B770947A9F8391472E032160B319410-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>

On Thursday 05 April 2007, Dor Laor wrote:
> >> >For example, lets says you are running several guests, and would
> like
> >> to
> >> >start yet another one for a while - but have no free memory left.
> >> >
> >>
> >> We have another solution for it that will soon be pushed into the
> >> kernel:
> >> It is the balloon driver solution.
> >> Each guest runs a balloon driver, when the host needs to free up
> memory
> >> a daemon with certain policy asks some of the guests to inflate their
> >> balloon,
> >> KVM frees their ballooned pages and the host free memory increases.
> >> When the memory pressure relives, the balloons get deflate command.
> >
> >You probably want to have a look at arch/s390/mm/cmm.c which is
> >exactly doing what you want. Of course the message interface to the
> >hypervisor is different to what you want to do.
> 
> Gee, thanks, I wasn't aware of it. I wrote the Linux driver, not yet
> ready for mainline. This might change things and I'll might use/change
> the cmm.
> It will take a while because my queue is jammed with too much stuff.

Another driver you might want to look at is the Xen balloon driver:
http://81.161.245.2/lxr/http/source/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c

The s390 driver is probably a better example though. One thing the
Xen one got wrong is that its interface requires you do an hcall in
order to get back a page that you gave up to the host. On s390, it
simply maps the host empty_zero_page as COW into the guest like
the initial memory, so you get a new page back with the regular
method whenever you write to the guest real page.

	Arnd <><

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

  parent reply	other threads:[~2007-04-05 12:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-04 11:13 memory hotplug for guests? Tomasz Chmielewski
     [not found] ` <4613886F.5070408-Nem3ZqsbT/g@public.gmane.org>
2007-04-04 11:42   ` Dor Laor
     [not found]     ` <64F9B87B6B770947A9F8391472E032160B318D11-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-04-05 10:16       ` Heiko Carstens
     [not found]         ` <20070405101608.GB8025-Pmgahw53EmNLmI7Nx2oIsGnsbthNF6/HVpNB7YpNyf8@public.gmane.org>
2007-04-05 11:52           ` Dor Laor
     [not found]             ` <64F9B87B6B770947A9F8391472E032160B319410-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-04-05 12:28               ` Arnd Bergmann [this message]
     [not found]                 ` <200704051428.17198.arnd-r2nGTMty4D4@public.gmane.org>
2007-04-05 12:39                   ` Avi Kivity
     [not found]                     ` <4614EE12.7060702-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-05 12:50                       ` Dor Laor
     [not found]                         ` <64F9B87B6B770947A9F8391472E032160B31944E-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-04-05 14:17                           ` Arnd Bergmann
     [not found]                             ` <200704051617.18936.arnd-r2nGTMty4D4@public.gmane.org>
2007-04-05 14:31                               ` Avi Kivity
     [not found]                                 ` <46150835.80700-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-04-05 14:41                                   ` Arnd Bergmann
     [not found]                                     ` <200704051641.49792.arnd-r2nGTMty4D4@public.gmane.org>
2007-04-05 14:48                                       ` Dor Laor

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=200704051428.17198.arnd@arndb.de \
    --to=arnd-r2ngtmty4d4@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    /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