On 09-Jan-19 17:36, Jason Gunthorpe wrote:>> We can also just fail mmaps for pages that are still used by a different >> ucontext instead of deferring the PD deallocation. > > How do you know if they are still used? Store all mapped BAR pages per device, every mmap to a page that still exists in our database will fail (unless it's from the same ucontext). Dealloc ucontext will remove all pages associated to the ucontext so other users could mmap it.