mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
migration: implement bi-directional RDMA QIOChannel
This patch implements bi-directional RDMA QIOChannel. Because different threads may access RDMAQIOChannel currently, this patch use RCU to protect it. Signed-off-by: Lidong Chen <lidongchen@tencent.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
55cc1b5937
commit
74637e6f08
6 changed files with 183 additions and 26 deletions
|
@ -989,6 +989,7 @@ static void *multifd_send_thread(void *opaque)
|
|||
int ret;
|
||||
|
||||
trace_multifd_send_thread_start(p->id);
|
||||
rcu_register_thread();
|
||||
|
||||
if (multifd_send_initial_packet(p, &local_err) < 0) {
|
||||
goto out;
|
||||
|
@ -1051,6 +1052,7 @@ out:
|
|||
p->running = false;
|
||||
qemu_mutex_unlock(&p->mutex);
|
||||
|
||||
rcu_unregister_thread();
|
||||
trace_multifd_send_thread_end(p->id, p->num_packets, p->num_pages);
|
||||
|
||||
return NULL;
|
||||
|
@ -1220,6 +1222,7 @@ static void *multifd_recv_thread(void *opaque)
|
|||
int ret;
|
||||
|
||||
trace_multifd_recv_thread_start(p->id);
|
||||
rcu_register_thread();
|
||||
|
||||
while (true) {
|
||||
uint32_t used;
|
||||
|
@ -1266,6 +1269,7 @@ static void *multifd_recv_thread(void *opaque)
|
|||
p->running = false;
|
||||
qemu_mutex_unlock(&p->mutex);
|
||||
|
||||
rcu_unregister_thread();
|
||||
trace_multifd_recv_thread_end(p->id, p->num_packets, p->num_pages);
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue