ram: Use memory_region_test_and_clear_dirty
This avoids having to do two walks over the dirty bitmap, once readingthe dirty bits, and anthoer cleaning them.
Signed-off-by: Juan Quintela <quintela@redhat.com>
ram: optimize migration bitmap walking
Instead of testing each page individually, we search what is the nextdirty page with a bitmap operation. We have to reorganize the code tomove from a "for" loop, to a while(dirty) loop.
ram: account the amount of transferred ram better
ram: refactor ram_save_block() return value
It could only return 0 if we only found dirty xbzrle pages that hadn'tchanged (i.e. they were written with the same content). We don't careabout that case, it is the same than nothing dirty.
So now the return of the function is how much have it written, nothing...
migration: fix qemu_get_fd for BufferedFile
Not really used, but nice to have it correct. :)
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>
migration: Inline qemu_fopen_ops_buffered into migrate_fd_connect
migration: move migration notifier
At this point, it is waranteed that state is ACTIVE. Old positiondidn't assured hat.
ram: rename last_block to last_seen_block
ram: Add last_sent_block
This is the last block from where we have sent data.
Signed-off-by: Orit Wasserman <owasserm@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>
memory: introduce memory_region_test_and_clear_dirty
This function avoids having to do two calls, one to test the dirty bit, andother to reset it.
View all revisions | View revisions
Also available in: Atom