Hi Jason, David, > > > Sure, we can simply always fail when we detect ZONE_MOVABLE or > > MIGRATE_CMA. > > > Maybe that keeps at least some use cases working. > > > > That seems fairly reasonable > AFAICS, failing udmabuf_create() if we detect one or more pages are in > ZONE_MOVABLE or MIGRATE_CMA would not be a recoverable failure -- > as it would result in the failure of Guest GUI (or compositor). > > I think it makes sense to have a generic version of > And, since check_and_migrate_movable_pages() is GUP-specific, would > it be ok to create a generic version of that (in mm/migrate.c) which can be > used by udmabuf and/or other drivers in the future? Sorry, I accidentally sent this earlier email before finishing it. What I meant to say is since the same situation (inadvertently pinning pages in movable) may probably arise in the future with another driver, I think it makes sense to have a generic (non-GUP) version of check_and_migrate_movable_pages() available in migration.h that drivers can use to ensure that they don't break memory hotunplug accidentally. Thanks, Vivek > > Thanks, > Vivek > > > > > Jason >