On Sun, Aug 11, 2024 at 11:39:22PM -0700, Christoph Hellwig wrote: > On Thu, Aug 08, 2024 at 12:33:39PM -0600, Martin Oliveira wrote: > > This check existed originally due to concerns that P2PDMA needed to copy > > fsdax until pgmap refcounts were fixed (see [1]). > > > > The P2PDMA infrastructure will only call unmap_mapping_range() when the > > underlying device is unbound, and immediately after unmapping it waits > > for the reference of all ZONE_DEVICE pages to be released before > > continuing. This does not allow for a page to be reused and no user > > access fault is therefore possible. It does not have the same problem as > > fsdax. > > > > The one minor concern with FOLL_LONGTERM pins is they will block device > > unbind until userspace releases them all. > > This is unfortunately not really minor unless we have a well documented > way to force this :( It is not that different from blocking driver unbind while FDs are open which a lot of places do in various ways? Jason