Message ID | 20190528014703.21030-4-richardw.yang@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Multifd Cleanup | expand |
Wei Yang <richardw.yang@linux.intel.com> wrote: > Besides init and destroy, MultiFDSendParams.sem_sync is not really used. > > Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> Reviewed-by: Juan Quintela <quintela@redhat.com> I mad SendParamas and RecvParams identical, but they are different. You are right.
On Tue, May 28, 2019 at 10:16:06AM +0200, Juan Quintela wrote: >Wei Yang <richardw.yang@linux.intel.com> wrote: >> Besides init and destroy, MultiFDSendParams.sem_sync is not really used. >> >> Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> > >Reviewed-by: Juan Quintela <quintela@redhat.com> > >I mad SendParamas and RecvParams identical, but they are different. You >are right. Thanks. BTW, I found some interesting thing about multifd_send_state->channels_ready. By checking the value of this semaphore, it grows far beyond what we really have. For example, we have default 2 channels which means multifd_send_state->channels_ready's value is no more than 2. But the actual value could go to more than 30. The behavior sounds not right.
diff --git a/migration/ram.c b/migration/ram.c index dcf4c54eb5..5d31f7bd4c 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -661,8 +661,6 @@ typedef struct { uint64_t num_packets; /* pages sent through this channel */ uint64_t num_pages; - /* syncs main thread and channels */ - QemuSemaphore sem_sync; } MultiFDSendParams; typedef struct { @@ -1027,7 +1025,6 @@ void multifd_save_cleanup(void) p->c = NULL; qemu_mutex_destroy(&p->mutex); qemu_sem_destroy(&p->sem); - qemu_sem_destroy(&p->sem_sync); g_free(p->name); p->name = NULL; multifd_pages_clear(p->pages); @@ -1201,7 +1198,6 @@ int multifd_save_setup(void) qemu_mutex_init(&p->mutex); qemu_sem_init(&p->sem, 0); - qemu_sem_init(&p->sem_sync, 0); p->quit = false; p->pending_job = 0; p->id = i;
Besides init and destroy, MultiFDSendParams.sem_sync is not really used. Signed-off-by: Wei Yang <richardw.yang@linux.intel.com> --- migration/ram.c | 4 ---- 1 file changed, 4 deletions(-)