diff options
author | Jason Gunthorpe <jgg@mellanox.com> | 2019-08-16 12:25:39 -0300 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2019-08-20 09:35:02 -0300 |
commit | f4fb3b9c1971ec210b30845a9f62dc823c5242d0 (patch) | |
tree | a6b1df0389f5c2cb21330a04f1aaf25dfb9f45ab /Documentation/vm | |
parent | 9c240a7bb33787d4fed56508425ae0b2936b1674 (diff) | |
parent | 471f390205698ed5225af052a80b71d2bce6b93a (diff) | |
download | linux-f4fb3b9c1971ec210b30845a9f62dc823c5242d0.tar.gz linux-f4fb3b9c1971ec210b30845a9f62dc823c5242d0.tar.bz2 linux-f4fb3b9c1971ec210b30845a9f62dc823c5242d0.zip |
Merge 'notifier_get_put' into hmm.git
Jason Gunthorpe says:
====================
Add mmu_notifier_get/put for managing mmu notifier registrations
This series introduces a new registration flow for mmu_notifiers based on
the idea that the user would like to get a single refcounted piece of
memory for a mm, keyed to its use.
For instance many users of mmu_notifiers use an interval tree or similar
to dispatch notifications to some object. There are many objects but only
one notifier subscription per mm holding the tree.
Of the 12 places that call mmu_notifier_register:
- 7 are maintaining some kind of obvious mapping of mm_struct to
mmu_notifier registration, ie in some linked list or hash table. Of
the 7 this series converts 4 (gru, hmm, RDMA, radeon)
- 3 (hfi1, gntdev, vhost) are registering multiple notifiers, but each
one immediately does some VA range filtering, ie with an interval tree.
These would be better with a global subsystem-wide range filter and
could convert to this API.
- 2 (kvm, amd_iommu) are deliberately using a single mm at a time, and
really can't use this API. One of the intel-svm's modes is also in this
list
The 3/7 unconverted drivers are:
- intel-svm
This driver tracks mm's in a global linked list 'global_svm_list'
and would benefit from this API.
Its flow is a bit complex, since it also wants a set of non-shared
notifiers.
- i915_gem_usrptr
This driver tracks mm's in a per-device hash
table (dev_priv->mm_structs), but only has an optional use of
mmu_notifiers. Since it still seems to need the hash table it is
difficult to convert.
- amdkfd/kfd_process
This driver is using a global SRCU hash table to track mm's
The control flow here is very complicated and the driver is relying on
this hash table to be fast on the ioctl syscall path.
It would definitely benefit, but only if the ioctl path didn't need to
do the search so often.
====================
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'Documentation/vm')
0 files changed, 0 insertions, 0 deletions