On Mon, 2014-05-26 at 22:32 +0200, Peter Zijlstra wrote: > Not sure what you mean, the one bit is perfectly fine for what I want it > to do. > > > This supposed to supports pinning only by one user and only in its own mm? > > Pretty much, that's adequate for all users I'm aware of and mirrors the > mlock semantics. Ok so I only just saw this. CC'ing Alex Williamson There is definitely another potential user for that stuff which is KVM with passed-through devices. What vfio does today on x86 is "interesting": Look at drivers/vfio/vfio_iommu_type1.c and functions vfio_pin_pages() I especially like the racy "delayed" accounting ... The problem is that in the generic case of VFIO, we don't know in advance what needs to be pinned. The user might pin pages on demand and it has to be a reasonably fast path. Additionally, a given page can be mapped multiple times and we don't have a good place to keep a counter.... So the one bit of state is definitely not enough. Cheers, Ben. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>