On Mon, Nov 04, 2024 at 05:53:22PM +0530, Prasad Pandit wrote: > On Fri, 1 Nov 2024 at 20:06, Peter Xu <pet...@redhat.com> wrote: > > > - return s->capabilities[MIGRATION_CAPABILITY_MULTIFD]; > > > + return s->capabilities[MIGRATION_CAPABILITY_MULTIFD] > > > + && !migration_in_postcopy(); > > > } > > > > We need to keep this as-is.. I'm afraid. > > You can always do proper check with multifd & !postcopy in your use cases. > > * Above change simplifies it a lot. Separate checks as > migrate_multifd() && !migration_in_postcopy() make it more complicated > to follow, because migrate_multifd() is often combined with other > checks like migrate_multifd_flush, or migrate_mapped_ram etc. I was > hoping to avoid adding one more check to those conditionals. Also, > with the above change we don't have to explicitly check where to add > !migration_in_postcopy() check.
We definitely need a helper like this to simply detect what the user chose on the feature. You can still introduce a new helper, e.g. migrate_multifd_precopy(), if that simplifies the code. Thanks, > > * Will try to separate them. > > Thank you. > --- > - Prasad > -- Peter Xu