From: Gleb Natapov <gleb@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] add MADV_DONTFORK to guest physical memory
Date: Thu, 16 Sep 2010 08:51:15 +0200 [thread overview]
Message-ID: <20100916065115.GS3008@redhat.com> (raw)
In-Reply-To: <20100915210314.GB5526@redhat.com>
On Wed, Sep 15, 2010 at 11:03:14PM +0200, Michael S. Tsirkin wrote:
> On Wed, Sep 15, 2010 at 07:08:24PM +0200, Andrea Arcangeli wrote:
> > From: Andrea Arcangeli <aarcange@redhat.com>
> >
> > All allocated guest physical memory shall be marked MADV_DONTFORK, otherwise
> > fork will fail because of accounting issues preventing migration or netdev_add
> > when the guest allocated more than half of host physical memory.
> >
> > Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
> > ---
> >
> > diff --git a/exec.c b/exec.c
> > index 380dab5..e2bdf19 100644
> > --- a/exec.c
> > +++ b/exec.c
> > @@ -2861,6 +2861,9 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name,
> > #ifdef MADV_MERGEABLE
> > madvise(new_block->host, size, MADV_MERGEABLE);
> > #endif
> > +#ifdef MADV_DONTFORK
> > + madvise(new_block->host, size, MADV_DONTFORK);
> > +#endif
> > }
> > }
>
> Is this always a number of full host pages? If not, we'd get trouble
> when trying to call helpers.
>
How it can be not a number of full host pages? This is guest memory.
--
Gleb.
prev parent reply other threads:[~2010-09-16 6:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-15 17:08 [Qemu-devel] [PATCH] add MADV_DONTFORK to guest physical memory Andrea Arcangeli
2010-09-15 17:34 ` Alexander Graf
2010-09-15 17:37 ` Andreas Färber
2011-01-05 15:10 ` Andrea Arcangeli
2011-01-05 18:02 ` Michael Roth
2011-01-05 19:44 ` Alexander Graf
2011-01-05 19:54 ` Andrea Arcangeli
2011-01-05 20:00 ` Alexander Graf
2011-01-05 20:12 ` Anthony Liguori
2011-01-05 20:15 ` Andrea Arcangeli
2011-01-05 20:26 ` Michael Roth
2011-01-05 20:35 ` Andrea Arcangeli
2011-01-05 21:27 ` Michael Roth
2011-01-06 17:49 ` Andrea Arcangeli
2011-01-06 20:49 ` Michael Roth
2011-01-05 20:10 ` Anthony Liguori
2010-09-15 21:03 ` [Qemu-devel] " Michael S. Tsirkin
2010-09-16 6:51 ` Gleb Natapov [this message]
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=20100916065115.GS3008@redhat.com \
--to=gleb@redhat.com \
--cc=aarcange@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=mst@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.