From: Blue Swirl <blauwirbel@gmail.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset
Date: Wed, 24 Feb 2010 22:59:16 +0200 [thread overview]
Message-ID: <f43fc5581002241259s61ad8b2ajb1b34519dd944258@mail.gmail.com> (raw)
In-Reply-To: <1267038612-21581-1-git-send-email-aliguori@us.ibm.com>
On 2/24/10, Anthony Liguori <aliguori@us.ibm.com> wrote:
> If you compare the RSS of a freshly booted guest and the same guest after a
> reboot, it's very likely the freshly booted guest will have an RSS that is
> much lower the the rebooted guest because the previous run of the guest faulted
> in all available memory.
>
> This patch addresses this issue by using madvise() during reset. It only
> resets RAM areas which means it has to be done in the machine. I've only done
> this for the x86 target because I'm fairly confident that this is allowed
> architecturally on x86 although I'm not sure this is universely true.
>
> This does not appear to have an observable cost with a large memory guest and
> I can't really think of any down sides.
I think it would be much cleaner to make the madvise() calls from
exec.c, now you are duplicating some of the functionality there. The
calls could be controlled by a global variable (set only in pc.c) so
non-PC architectures would not be disturbed.
next prev parent reply other threads:[~2010-02-24 20:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-24 19:10 [Qemu-devel] [PATCH] pc: madvise(MADV_DONTNEED) memory on reset Anthony Liguori
2010-02-24 20:59 ` Blue Swirl [this message]
2010-02-24 22:05 ` Anthony Liguori
2010-02-28 0:57 ` Paul Brook
2010-02-24 23:56 ` Samuel Thibault
2010-02-28 9:13 ` Stefan Hajnoczi
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=f43fc5581002241259s61ad8b2ajb1b34519dd944258@mail.gmail.com \
--to=blauwirbel@gmail.com \
--cc=aliguori@us.ibm.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).