On Fri, Feb 21, 2025 at 02:36:11PM +0800, Li Zhijian wrote: > Since we have disabled RDMA + postcopy, it's safe to remove > the migration_in_postcopy() that follows the migration_rdma(). > > Signed-off-by: Li Zhijian <lizhij...@fujitsu.com> > --- > migration/ram.c | 2 +- > migration/rdma.c | 5 +++-- > 2 files changed, 4 insertions(+), 3 deletions(-) > > diff --git a/migration/ram.c b/migration/ram.c > index e07651aee8d..c363034c882 100644 > --- a/migration/ram.c > +++ b/migration/ram.c > @@ -1939,7 +1939,7 @@ static int ram_save_target_page(RAMState *rs, > PageSearchStatus *pss) > int res; > > /* Hand over to RDMA first */ > - if (migrate_rdma() && !migration_in_postcopy()) {
This line was just added in previous patch. Would it be better move 5/6 above, then somehow squash 2/3/4/7 so that it doesn't need to add something and got removed again? I feel like the four patches can be squashed into 1 or 2 instead when reorder them. > + if (migrate_rdma()) { > res = rdma_control_save_page(pss->pss_channel, pss->block->offset, > offset, TARGET_PAGE_SIZE); > > diff --git a/migration/rdma.c b/migration/rdma.c > index c6876347e1e..0349dd4a8b8 100644 > --- a/migration/rdma.c > +++ b/migration/rdma.c > @@ -3826,7 +3826,7 @@ int rdma_block_notification_handle(QEMUFile *f, const > char *name) > > int rdma_registration_start(QEMUFile *f, uint64_t flags) > { > - if (!migrate_rdma() || migration_in_postcopy()) { > + if (!migrate_rdma()) { > return 0; > } > > @@ -3858,7 +3858,8 @@ int rdma_registration_stop(QEMUFile *f, uint64_t flags) > RDMAControlHeader head = { .len = 0, .repeat = 1 }; > int ret; > > - if (!migrate_rdma() || migration_in_postcopy()) { > + /* Hand over to RDMA first */ > + if (!migrate_rdma()) { > return 0; > } > > -- > 2.44.0 > -- Peter Xu