- 17 Jan, 2013 5 commits
-
-
Juan Quintela authored
Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Reviewed-by: Eric Blake <eblake@redhat.com>
-
Paolo Bonzini authored
The call in buffered_close is enough, because buffered_close is called already by migrate_fd_cleanup. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Reviewed-by: Eric Blake <eblake@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Reviewed-by: Eric Blake <eblake@redhat.com>
-
Paolo Bonzini authored
commit 5b4e1eb7 missed this use. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Reviewed-by: Eric Blake <eblake@redhat.com>
-
- 20 Dec, 2012 14 commits
-
-
Juan Quintela authored
Avoid splitting the state of outgoing migration, more or less arbitrarily, between two data structures. QEMUFileBuffered anyway is used only during migration. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Paolo Bonzini authored
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>
-
Juan Quintela authored
At this point, it is waranteed that state is ACTIVE. Old position didn't assured hat. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Put it near its use and un-export it. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
The "magic" divisions by 10 are there because of the value of BUFFER_DELAY. Introduce a constant to explain them better. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
This only moves the code (also from buffered_file.h to migration.h). Fix whitespace until checkpatch is happy. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
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 knows that remaining memory to sent takes less than max downtime. But this means that we could end spending 2x max_downtime, one downtime in qemu_savevm_iterate, and the other in qemu_savevm_state_complete. Changed code to: pending_size = qemu_savevm_state_pending(s->file, max_size); DPRINTF("pending size %lu max %lu\n", pending_size, max_size); if (pending_size >= max_size) { ret = qemu_savevm_state_iterate(s->file); } else { vm_stop_force_state(RUN_STATE_FINISH_MIGRATE); qemu_savevm_state_complete(s->file); } So what we do is: at current network speed, we calculate the maximum number of bytes we can sent: max_size. Then we ask every save_live section how much they have pending. If they are less than max_size, we move to complete phase, otherwise we do an iterate one. This makes things much simpler, because now individual sections don't have to caluclate the bandwidth (it was implossible to do right from there). Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Juan Quintela authored
Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
Now that we have a thread, and blocking writes, we don't need it. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Juan Quintela authored
Move all the writes to the migration_thread, and make writings blocking. Notice that are still using the iothread for everything that we do. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
This way everything related with migration is run on the migration thread and no locking is needed. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
We want the file assignment to happen before the thread is created to avoid locking, so we just do it before creating the thread. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Orit Wasserman <owasserm@redhat.com>
-
Paolo Bonzini authored
The call in buffered_close is enough, because buffered_close is called already by migrate_fd_cleanup. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- 19 Dec, 2012 5 commits
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 02 Nov, 2012 3 commits
-
-
Paolo Bonzini authored
The final part of incoming migration, which now consists of process_incoming_migration for all protocols, is thus made non-blocking. Reviewed-by:
Orit Wasserman <owasserm@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The common suffix is now just process_incoming_migration. Reviewed-by:
Orit Wasserman <owasserm@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
migrate_fd_cleanup will usually close the file descriptor via buffered_file_close's call to migrate_fd_close. However, in the case of s->file == NULL it is "inlining" migrate_fd_close (almost: there is a direct close() instead of using s->close(s)). To fix the inconsistency and clean up the code, allow multiple calls to migrate_fd_close and use the function in migrate_fd_cleanup. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 24 Oct, 2012 1 commit
-
-
Paolo Bonzini authored
At the end of migration the machine has started already, and cannot be destroyed without losing the guest's data. Hence, prelaunch is the wrong state. Go to the paused state instead. QEMU would reach that state anyway (after running the guest for the blink of an eye) if the "stop" command had been received after the start of migration. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Luiz Capitulino <lcapitulino@redhat.com>
-
- 23 Oct, 2012 5 commits
-
-
Paolo Bonzini authored
And remove the superfluous integer return value. Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Error propagation is already there for socket backends. Add it to other protocols, simplifying code that tests for errors that will never happen. With all protocols understanding Error, the code can be simplified further by removing the return value. Unfortunately, the quality of error messages varies depending on where the error is detected, because no Error is passed to the NonBlockingConnectHandler. Thus, the exact error message still cannot be sent to the user if the OS reports it asynchronously via SO_ERROR. If NonBlockingConnectHandler received an Error**, we could for example report the error class and/or message via a new field of the query-migration command even if it is reported asynchronously. Before: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate (qemu) After: (qemu) migrate fd:ffff migrate: File descriptor named 'ffff' has not been found (qemu) info migrate capabilities: xbzrle: off Migration status: failed total time: 0 milliseconds Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
This makes migration-unix.c again a cut-and-paste job from migration-tcp.c, exactly as it was in the beginning. :) Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The call to migrate_fd_error() was missing for non-socket backends, so centralize it in qmp_migrate(). Before: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate (qemu) After: (qemu) migrate fd:ffff migrate: An undefined error has occurred (qemu) info migrate capabilities: xbzrle: off Migration status: failed total time: 0 milliseconds (The awful error message will be fixed later in the series). Reviewed-by:
Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
The migration code is using errp to detect "internal" errors, this means that it relies on errp being non-NULL. No impact so far because our only QMP clients (the QMP marshaller and HMP) never pass a NULL Error **. But if we had others, this patch would make sure that migration can work with a NULL Error **. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- 17 Oct, 2012 7 commits
-
-
Juan Quintela authored
Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Juan Quintela authored
Adjust all callers Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Juan Quintela authored
Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Juan Quintela authored
We only used it once, just remove the callback indirection. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
We only used it once, just remove the callback indirection. Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
Juan Quintela authored
We only use it once, just remove the callback indirection. Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Juan Quintela authored
We only used it once, just remove the callback indirection Signed-off-by:
Juan Quintela <quintela@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com>
-