On Wed, Oct 23, 2019 at 05:24:45PM +0000, Jason Gunthorpe wrote: > mlx5 is similar, but not currently coded quite right, there is one > lock that protects the command queue for submitting invalidations to > the HW and it doesn't make a lot of sense to have additional fine > grained locking beyond that. IFF all drivers could agree on a lock type (rw_semaphore?) for this protection you could add a pointer to the range which would clear things up a lot. I'm just not sure you could get everyone to agree.