mirror of https://github.com/xemu-project/xemu.git
multifd: Fix flush of zero copy page send request
Make IO channel flush call after the inflight request has been drained in multifd thread, or else we may missed to flush the inflight request. Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com>
This commit is contained in:
parent
ddbe628c97
commit
ebfc578715
|
@ -0,0 +1,7 @@
|
|||
# Boards:
|
||||
#
|
||||
CONFIG_ISAPC=n
|
||||
CONFIG_I440FX=n
|
||||
CONFIG_Q35=n
|
||||
CONFIG_MICROVM=y
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
# Boards:
|
||||
#
|
||||
CONFIG_ISAPC=y
|
||||
CONFIG_I440FX=y
|
||||
CONFIG_Q35=y
|
||||
CONFIG_MICROVM=y
|
|
@ -630,16 +630,16 @@ int multifd_send_sync_main(QEMUFile *f)
|
|||
stat64_add(&ram_atomic_counters.transferred, p->packet_len);
|
||||
qemu_mutex_unlock(&p->mutex);
|
||||
qemu_sem_post(&p->sem);
|
||||
|
||||
if (flush_zero_copy && p->c && (multifd_zero_copy_flush(p->c) < 0)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
for (i = 0; i < migrate_multifd_channels(); i++) {
|
||||
MultiFDSendParams *p = &multifd_send_state->params[i];
|
||||
|
||||
trace_multifd_send_sync_main_wait(p->id);
|
||||
qemu_sem_wait(&p->sem_sync);
|
||||
|
||||
if (flush_zero_copy && p->c && (multifd_zero_copy_flush(p->c) < 0)) {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
trace_multifd_send_sync_main(multifd_send_state->packet_num);
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue