]> git.baikalelectronics.ru Git - kernel.git/commit
nouveau: use mmu_interval_notifier instead of hmm_mirror
authorJason Gunthorpe <jgg@mellanox.com>
Tue, 12 Nov 2019 20:22:26 +0000 (16:22 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 23 Nov 2019 23:56:44 +0000 (19:56 -0400)
commitc180c2012b8c053eb5f96eac9c92b502d5fe0d80
treebbd869d0d061cb4f354b0a7a78bdbd03e201683b
parent65bd9fce167d20fa46d2f85fc514e92c1e1df484
nouveau: use mmu_interval_notifier instead of hmm_mirror

Remove the hmm_mirror object and use the mmu_interval_notifier API instead
for the range, and use the normal mmu_notifier API for the general
invalidation callback.

While here re-organize the pagefault path so the locking pattern is clear.

nouveau is the only driver that uses a temporary range object and instead
forwards nearly every invalidation range directly to the HW. While this is
not how the mmu_interval_notifier was intended to be used, the overheads on
the pagefaulting path are similar to the existing hmm_mirror version.
Particularly since the interval tree will be small.

Link: https://lore.kernel.org/r/20191112202231.3856-10-jgg@ziepe.ca
Tested-by: Ralph Campbell <rcampbell@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/gpu/drm/nouveau/nouveau_svm.c