Message ID | 1612339311-114805-6-git-send-email-zhengchuan@huawei.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support Multifd for RDMA migration | expand |
This patch needs to explain why the sync isn't needed for RDMA. Dave * Chuan Zheng (zhengchuan@huawei.com) wrote: > Signed-off-by: Zhimin Feng <fengzhimin1@huawei.com> > Signed-off-by: Chuan Zheng <zhengchuan@huawei.com> > --- > migration/multifd.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/migration/multifd.c b/migration/multifd.c > index 4820702..5d34950 100644 > --- a/migration/multifd.c > +++ b/migration/multifd.c > @@ -583,6 +583,10 @@ void multifd_send_sync_main(QEMUFile *f) > if (!migrate_use_multifd()) { > return; > } > + /* Do not need sync for rdma */ > + if (migrate_use_rdma()) { > + return; > + } > if (multifd_send_state->pages->used) { > if (multifd_send_pages(f) < 0) { > error_report("%s: multifd_send_pages fail", __func__); > @@ -1024,6 +1028,10 @@ void multifd_recv_sync_main(void) > if (!migrate_use_multifd()) { > return; > } > + /* Do not need sync for rdma */ > + if (migrate_use_rdma()) { > + return; > + } > for (i = 0; i < migrate_multifd_channels(); i++) { > MultiFDRecvParams *p = &multifd_recv_state->params[i]; > > -- > 1.8.3.1 >
On 2021/2/4 2:10, Dr. David Alan Gilbert wrote: > This patch needs to explain why the sync isn't needed for RDMA. > > Dave > OK. the multifd with tcp will send pages if it has pages to send by the record of multifd_send_state->pages->used while RDMA is using rdma_write_hooks. > * Chuan Zheng (zhengchuan@huawei.com) wrote: >> Signed-off-by: Zhimin Feng <fengzhimin1@huawei.com> >> Signed-off-by: Chuan Zheng <zhengchuan@huawei.com> >> --- >> migration/multifd.c | 8 ++++++++ >> 1 file changed, 8 insertions(+) >> >> diff --git a/migration/multifd.c b/migration/multifd.c >> index 4820702..5d34950 100644 >> --- a/migration/multifd.c >> +++ b/migration/multifd.c >> @@ -583,6 +583,10 @@ void multifd_send_sync_main(QEMUFile *f) >> if (!migrate_use_multifd()) { >> return; >> } >> + /* Do not need sync for rdma */ >> + if (migrate_use_rdma()) { >> + return; >> + } >> if (multifd_send_state->pages->used) { >> if (multifd_send_pages(f) < 0) { >> error_report("%s: multifd_send_pages fail", __func__); >> @@ -1024,6 +1028,10 @@ void multifd_recv_sync_main(void) >> if (!migrate_use_multifd()) { >> return; >> } >> + /* Do not need sync for rdma */ >> + if (migrate_use_rdma()) { >> + return; >> + } >> for (i = 0; i < migrate_multifd_channels(); i++) { >> MultiFDRecvParams *p = &multifd_recv_state->params[i]; >> >> -- >> 1.8.3.1 >>
diff --git a/migration/multifd.c b/migration/multifd.c index 4820702..5d34950 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -583,6 +583,10 @@ void multifd_send_sync_main(QEMUFile *f) if (!migrate_use_multifd()) { return; } + /* Do not need sync for rdma */ + if (migrate_use_rdma()) { + return; + } if (multifd_send_state->pages->used) { if (multifd_send_pages(f) < 0) { error_report("%s: multifd_send_pages fail", __func__); @@ -1024,6 +1028,10 @@ void multifd_recv_sync_main(void) if (!migrate_use_multifd()) { return; } + /* Do not need sync for rdma */ + if (migrate_use_rdma()) { + return; + } for (i = 0; i < migrate_multifd_channels(); i++) { MultiFDRecvParams *p = &multifd_recv_state->params[i];