[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCHv2 8/9] migration: do not search dirty pages in b
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCHv2 8/9] migration: do not search dirty pages in bulk stage |
Date: |
Tue, 19 Mar 2013 11:40:25 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
On 03/15/2013 09:50 AM, Peter Lieven wrote:
> avoid searching for dirty pages just increment the
> page offset. all pages are dirty anyway.
>
> Signed-off-by: Peter Lieven <address@hidden>
> ---
> arch_init.c | 12 +++++++++---
> 1 file changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/arch_init.c b/arch_init.c
> index a3dc20d..ca281ad 100644
> --- a/arch_init.c
> +++ b/arch_init.c
> @@ -321,8 +321,14 @@ ram_addr_t
> migration_bitmap_find_and_reset_dirty(MemoryRegion *mr,
> unsigned long nr = base + (start >> TARGET_PAGE_BITS);
> unsigned long size = base + (int128_get64(mr->size) >> TARGET_PAGE_BITS);
>
> - unsigned long next = find_next_bit(migration_bitmap, size, nr);
> -
> + unsigned long next;
> +
> + if (ram_bulk_stage) {
> + next = nr + 1;
> + } else {
> + next = find_next_bit(migration_bitmap, size, nr);
> + }
This part makes sense.
> +
> if (next < size) {
> clear_bit(next, migration_bitmap);
> migration_dirty_pages--;
> @@ -523,7 +529,7 @@ static void reset_ram_globals(void)
> {
> last_seen_block = NULL;
> last_sent_block = NULL;
> - last_offset = 0;
> + last_offset = -1;
But what is this change doing? I don't see it mentioned in the commit
message. Does it belong to a different commit?
> last_version = ram_list.version;
> ram_bulk_stage = true;
> }
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCHv2 0/9] buffer_is_zero / migration optimizations, Peter Lieven, 2013/03/15
- [Qemu-devel] [PATCHv2 9/9] migration: use XBZRLE only after bulk stage, Peter Lieven, 2013/03/15
- [Qemu-devel] [PATCHv2 8/9] migration: do not search dirty pages in bulk stage, Peter Lieven, 2013/03/15
- Re: [Qemu-devel] [PATCHv2 8/9] migration: do not search dirty pages in bulk stage,
Eric Blake <=
- [Qemu-devel] [PATCHv2 4/9] bitops: use vector algorithm to optimize find_next_bit(), Peter Lieven, 2013/03/15
- [Qemu-devel] [PATCHv2 3/9] buffer_is_zero: use vector optimizations if possible, Peter Lieven, 2013/03/15
- [Qemu-devel] [PATCHv2 2/9] cutils: add a function to find non-zero content in a buffer, Peter Lieven, 2013/03/15