From: Mark Williamson <mark.williamson@cl.cam.ac.uk>
To: qemu-devel@nongnu.org
Cc: Paul Brook <paul@codesourcery.com>
Subject: Re: [Qemu-devel] balloon driver
Date: Sun, 9 Jul 2006 02:32:54 +0100 [thread overview]
Message-ID: <200607090232.55272.mark.williamson@cl.cam.ac.uk> (raw)
In-Reply-To: <946a3fda0607081806r56d18980vd00f570de44a1466@mail.gmail.com>
> It seems the point of the balloon driver is to avoid forcing the host
> to swap. For example, suppose I start a new guest OS. I check the
> memory usage on the host and everything looks pretty good, maybe 30MB
> used. Then suppose I run a recursive grep command in a Linux source
> tree on the guest. The host memory usage will climb to the maximum
> allotted memory as the guest OS fills its page cache with pages of
> kernel source. Now, I go back to the host and decide I want to run
> something a little memory intensive. The host has to swap and
> dutifully copies those pages of kernel source to swap. Much better
> would be if I could just chuck those pages and give them back to the
> host, no swapping at all.
>
> Even if the guest has to swap, the reasoning is that the guest is in a
> much better position to figure out what to swap than if the host were
> forced to.
Worse, the guest might decide to swap out a page that's already swapped in by
the host, forcing it to be read in again only to be immediately written out
to disk by the guest :-(
> It is a rather crude approach and I'm not sure how much practical
> benefit there is, but I'll probably go ahead and code it up (at least
> for a Linux host) if only for myself as it looks pretty simple.
> (Linux 2.6.16 added the ability to punch holes in tmpfs files so all
> the hard work should be done). I just wondered if there was anything
> I was missing or if anyone had considered it before.
Xen has a balloon driver - you might like to take a look at that for starters,
and maybe borrow some code from it! There's been occasional talk to the
effect that a number of projects might as well share functionality like
ballooning since a number of systems require it.
Cheers,
Mark
>
> - E
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
--
Dave: Just a question. What use is a unicyle with no seat? And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!
next prev parent reply other threads:[~2006-07-09 1:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-05 2:58 [Qemu-devel] balloon driver Eric L
2006-07-05 14:52 ` Paul Brook
2006-07-09 1:06 ` Eric L
2006-07-09 1:32 ` Mark Williamson [this message]
2006-07-09 3:02 ` Jamie Lokier
2006-07-09 12:42 ` Mark Williamson
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=200607090232.55272.mark.williamson@cl.cam.ac.uk \
--to=mark.williamson@cl.cam.ac.uk \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).