[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 30/30] ram: optimize migration bitmap walking
From: |
Juan Quintela |
Subject: |
Re: [Qemu-devel] [PATCH 30/30] ram: optimize migration bitmap walking |
Date: |
Fri, 26 Oct 2012 13:39:51 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Orit Wasserman <address@hidden> wrote:
> On 10/18/2012 09:30 AM, Juan Quintela wrote:
>> Instead of testing each page individually, we search what is the next
>> dirty page with a bitmap operation. We have to reorganize the code to
>> move from a "for" loop, to a while(dirty) loop.
>>
>>
>> - do {
>> + while(true) {
>> mr = block->mr;
>> - if (migration_bitmap_test_and_reset_dirty(mr, offset)) {
>> + offset = migration_bitmap_find_and_reset_dirty(mr, offset);
>> + if (complete_round && block == last_seen_block &&
>> + offset >= last_offset) {
>> + break;
>> + }
> Juan,
> You need to exchange those line, first check to see you did a full round than
> calculate and reset the offset, in the way it is written now you may
> reset a bit and than break of the loop
> without sending it.
How?
if complete_round == true, it means that we are in the second round.
block == last_seen_block means that we are back at the 1st block that we
have looked.
if offset >= last_offset, there are two options:
a- == last_offset: that was the 1st one that we checked, so it can't be
true.
b- >= last_offset: it means tat we have already passed that bit, it
_has_ to be zero, otherwise somebody has changed the bitmap under or
foot.
Or have I missed something?
Notice that at some point we should allow for concurrent dirty of the
bitmap, but we need to do yet more things.
Later, Juan.
- [Qemu-devel] [PATCH 20/30] migration: move begining stage to the migration thread, (continued)
- [Qemu-devel] [PATCH 20/30] migration: move begining stage to the migration thread, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 29/30] migration: Only go to the iterate stage if there is anything to send, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 27/30] ram: Use memory_region_test_and_clear_dirty, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 25/30] ram: Add last_sent_block, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 26/30] memory: introduce memory_region_test_and_clear_dirty, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 28/30] fix memory.c, Juan Quintela, 2012/10/18
- [Qemu-devel] [PATCH 30/30] ram: optimize migration bitmap walking, Juan Quintela, 2012/10/18
Re: [Qemu-devel] [PATCH 00/30] Migration thread 20121017 edition, Paolo Bonzini, 2012/10/18
Re: [Qemu-devel] [PATCH 00/30] Migration thread 20121017 edition, Paolo Bonzini, 2012/10/26
Re: [Qemu-devel] [PATCH 00/30] Migration thread 20121017 edition, Chegu Vinod, 2012/10/24