From: Kevin Wolf <kwolf@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
quintela@redhat.com, Stefan Hajnoczi <stefanha@gmail.com>,
qemu-devel@nongnu.org, Orit Wasserman <owasserm@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages
Date: Mon, 8 Apr 2013 10:49:14 +0200 [thread overview]
Message-ID: <20130408084914.GD2657@dhcp-200-207.str.redhat.com> (raw)
In-Reply-To: <49B72003-C5C1-4109-806F-260F3522BD5B@kamp.de>
Am 08.04.2013 um 10:33 hat Peter Lieven geschrieben:
>
> Am 05.04.2013 um 21:23 schrieb Kevin Wolf <kwolf@redhat.com>:
>
> > Am 26.03.2013 um 10:58 hat Peter Lieven geschrieben:
> >> virtually all dup pages are zero pages. remove
> >> the special is_dup_page() function and use the
> >> optimized buffer_find_nonzero_offset() function
> >> instead.
> >>
> >> here buffer_find_nonzero_offset() is used directly
> >> to avoid the unnecssary additional checks in
> >> buffer_is_zero().
> >>
> >> raw performace gain checking 1 GByte zeroed memory
> >> over is_dup_page() is approx. 10-12% with SSE2
> >> and 8-10% with unsigned long arithmedtic.
> >>
> >> Signed-off-by: Peter Lieven <pl@kamp.de>
> >> Reviewed-by: Orit Wasserman <owasserm@redhat.com>
> >> Reviewed-by: Eric Blake <eblake@redhat.com>
> >
> > Okay, so I bisected again and this is the second patch that is involved
> > in the slowness of qemu-iotests case 007.
> >
>
> Can you try if the following solves your issue:
>
> diff --git a/exec.c b/exec.c
> index 786987a..54baa4a 100644
> --- a/exec.c
> +++ b/exec.c
> @@ -1071,6 +1071,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
> memory_try_enable_merging(new_block->host, size);
> }
> }
> + qemu_madvise(new_block->host, size, QEMU_MADV_DONTNEED);
> new_block->length = size;
>
> /* Keep the list sorted from biggest to smallest block. */
It does. But perhaps Paolo's suggestion of using mmap() to allocate the
memory would be better. I'm not sure how MADV_DONTNEED behaves on
non-Linux.
Kevin
next prev parent reply other threads:[~2013-04-08 8:49 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 9:58 [Qemu-devel] [PATCHv5 00/10] buffer_is_zero / migration optimizations Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 01/10] move vector definitions to qemu-common.h Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 02/10] add a zero splat vector " Peter Lieven
2013-03-26 10:14 ` Paolo Bonzini
2013-03-26 10:17 ` Peter Lieven
2013-03-26 10:17 ` Paolo Bonzini
2013-03-26 10:18 ` Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 03/10] cutils: add a function to find non-zero content in a buffer Peter Lieven
2013-03-26 10:38 ` Juan Quintela
2013-03-26 10:42 ` Peter Lieven
2013-03-26 10:41 ` Juan Quintela
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 04/10] buffer_is_zero: use vector optimizations if possible Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 05/10] bitops: unroll while loop in find_next_bit() Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 06/10] migration: search for zero instead of dup pages Peter Lieven
2013-04-05 19:23 ` Kevin Wolf
2013-04-05 20:00 ` Paolo Bonzini
2013-04-05 21:44 ` Peter Lieven
2013-04-05 22:06 ` Peter Lieven
2013-04-08 8:38 ` Paolo Bonzini
2013-04-08 9:25 ` Peter Lieven
2013-04-08 10:33 ` Paolo Bonzini
2013-04-08 8:33 ` Peter Lieven
2013-04-08 8:39 ` Peter Lieven
2013-04-08 8:49 ` Kevin Wolf [this message]
2013-04-08 8:50 ` Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 07/10] migration: add an indicator for bulk state of ram migration Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 08/10] migration: do not sent zero pages in bulk stage Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 09/10] migration: do not search dirty " Peter Lieven
2013-03-26 9:58 ` [Qemu-devel] [PATCHv5 10/10] migration: use XBZRLE only after " Peter Lieven
2013-03-26 10:46 ` [Qemu-devel] [PATCHv5 00/10] buffer_is_zero / migration optimizations Juan Quintela
2013-03-26 11:02 ` Peter Lieven
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=20130408084914.GD2657@dhcp-200-207.str.redhat.com \
--to=kwolf@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--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).