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: merge QEMUFileBuffered into MigrationState
Avoid splitting the state of outgoing migration, more or less arbitrarily,between two data structures. QEMUFileBuffered anyway is used only duringmigration.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
migration: add XFER_LIMIT_RATIO
The "magic" divisions by 10 are there because of the value of BUFFER_DELAY.Introduce a constant to explain them better.
migration: move migration_fd_put_ready()
Put it near its use and un-export it.
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.
migration: move buffered_file.c code into migration.c
This only moves the code (also from buffered_file.h to migration.h).Fix whitespace until checkpatch is happy.
migration: make qemu_fopen_ops_buffered() return void
We want the file assignment to happen before the thread is created toavoid locking, so we just do it before creating the thread.
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
migration: move migration thread init code to migrate_fd_put_ready
This way everything related with migration is run on the migrationthread and no locking is needed.
migration: make writes blocking
Move all the writes to the migration_thread, and make writingsblocking. Notice that are still using the iothread for everythingthat we do.
migration: remove unfreeze logic
Now that we have a thread, and blocking writes, we don't need it.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
migration: just lock migrate_fd_put_ready
buffered_file: Unfold the trick to restart generating migration data
This was needed before due to the way that the callbacks worked.
buffered_file: don't flush on put buffer
We call buffered_put_buffer with iothread held, and buffered_flush() doessynchronous writes. We only want to do the synchronous writes outside.
buffered_file: unfold buffered_append in buffered_put_buffer
It was the only user, and now buffered_put_buffer just do the append
savevm: New save live migration method: pending
Code just now does (simplified for clarity)
if (qemu_savevm_state_iterate(s->file) == 1) { vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); qemu_savevm_state_complete(s->file); }
Problem here is that qemu_savevm_state_iterate() returns 1 when it...
buffered_file: Move from using a timer to use a thread
We still protect everything except the wait with the iothread lock.But we moved from a timer to a thread. Steps one by one.
We also need to detect when we have finished with a variable "complete"....
exec: change RAM list to a TAILQ
exec: sort the memory from biggest to smallest
add a version number to ram_list
This will be used to detect if last_block might have become invalidacross different calls to ram_save_live.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Umesh Deshpande <udeshpan@redhat.com>Signed-off-by: Juan Quintela <quintela@redhat.com>...
protect the ramlist with a separate mutex
Add the new mutex that protects shared state between ram_save_liveand the iothread. If the iothread mutex has to be taken togetherwith the ramlist mutex, the iothread shall always be outside.
exec: change ramlist from MRU order to a 1-item cache
Most of the time, only 2 items will be active (from/to for a string operation,or code/data). But TCG guests likely won't have gigabytes of memory, sothis actually goes down to 1 item.
« Previous 1 ... 314 315 316 317 318 ... 1262 Next » (7876-7900/31548) | Per page: 25, 50, 100
Also available in: Atom