mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
rcu: actually register threads that have RCU read-side critical sections
Otherwise, grace periods are detected too early! Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
c170aad8b0
commit
ab28bd2312
5 changed files with 21 additions and 0 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "block/block.h"
|
||||
#include "qapi/qmp/qerror.h"
|
||||
#include "qemu/sockets.h"
|
||||
#include "qemu/rcu.h"
|
||||
#include "migration/block.h"
|
||||
#include "qemu/thread.h"
|
||||
#include "qmp-commands.h"
|
||||
|
@ -917,6 +918,8 @@ static void *migration_thread(void *opaque)
|
|||
int64_t start_time = initial_time;
|
||||
bool old_vm_running = false;
|
||||
|
||||
rcu_register_thread();
|
||||
|
||||
qemu_savevm_state_header(s->file);
|
||||
qemu_savevm_state_begin(s->file, &s->params);
|
||||
|
||||
|
@ -1016,6 +1019,7 @@ static void *migration_thread(void *opaque)
|
|||
qemu_bh_schedule(s->cleanup_bh);
|
||||
qemu_mutex_unlock_iothread();
|
||||
|
||||
rcu_unregister_thread();
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue