On 23/10/2019 17:41, Jason Gunthorpe wrote: > On Wed, Oct 23, 2019 at 09:40:44AM +0300, Gal Pressman wrote: >>> In the mlx drivers this was done during destruction of the ucontext, >>> but with this new mmap stuff it could be moved to the mmap_free.. >> >> Dealloc UAR is currently being called during dealloc_ucontext. >> The mmap_free callback is per entry, how can dealloc_uar be moved there? > > If it is some global per context uar then sure, it should live till > dealloc ucontext > > If it is a dynamicly created uar then it should have a shorter > lifetime. It's a UAR per ucontext. Created on alloc_ucontext and deallocated on dealloc_ucontext.