qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com, stefanha@gmail.com,
	pl@kamp.de, qemu-devel@nongnu.org, owasserm@redhat.com
Subject: Re: [Qemu-devel] [PATCH] migration: initialize RAM to zero
Date: Tue, 09 Apr 2013 13:23:19 +0200	[thread overview]
Message-ID: <87li8sdk2g.fsf@elfo.elfo> (raw)
In-Reply-To: <1365418028-2546-1-git-send-email-pbonzini@redhat.com> (Paolo Bonzini's message of "Mon, 8 Apr 2013 12:47:08 +0200")

Paolo Bonzini <pbonzini@redhat.com> wrote:
> Using qemu_memalign only leaves the RAM zero by chance, because libc
> will usually use mmap to satisfy our huge requests.  But memory will
> not be zero when using MALLOC_PERTURB_ with a nonzero value.  In the
> case of incoming migration, this breaks a recently-introduced
> invariant (commit f1c7279, migration: do not sent zero pages in
> bulk stage, 2013-03-26).
>
> To fix this, use mmap ourselves to get a well-aligned, always zero
> block for the RAM.  Mmap-ed memory is easy to "trim" at the sides.
>
> This also removes the need to do something special on valgrind
> (see commit c2a8238a, Support running QEMU on Valgrind, 2011-10-31).
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Except for the mmap return check and the missing valgrind check,  the
patch looks good.

Thanks,  Juan.

      parent reply	other threads:[~2013-04-09 11:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 10:47 [Qemu-devel] [PATCH] migration: initialize RAM to zero Paolo Bonzini
2013-04-08 14:55 ` Peter Lieven
2013-04-09  8:52 ` Markus Armbruster
2013-04-09  8:56   ` Paolo Bonzini
2013-04-09 11:27     ` Markus Armbruster
2013-04-09 11:23 ` Juan Quintela [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=87li8sdk2g.fsf@elfo.elfo \
    --to=quintela@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=owasserm@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=pl@kamp.de \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.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;
as well as URLs for NNTP newsgroup(s).