linux/drivers/infiniband/core
Haggai Eran 882214e2b1 IB/core: Implement support for MMU notifiers regarding on demand paging regions
* Add an interval tree implementation for ODP umems. Create an
  interval tree for each ucontext (including a count of the number of
  ODP MRs in this context, semaphore, etc.), and register ODP umems in
  the interval tree.
* Add MMU notifiers handling functions, using the interval tree to
  notify only the relevant umems and underlying MRs.
* Register to receive MMU notifier events from the MM subsystem upon
  ODP MR registration (and unregister accordingly).
* Add a completion object to synchronize the destruction of ODP umems.
* Add mechanism to abort page faults when there's a concurrent invalidation.

The way we synchronize between concurrent invalidations and page
faults is by keeping a counter of currently running invalidations, and
a sequence number that is incremented whenever an invalidation is
caught. The page fault code checks the counter and also verifies that
the sequence number hasn't progressed before it updates the umem's
page tables. This is similar to what the kvm module does.

In order to prevent the case where we register a umem in the middle of
an ongoing notifier, we also keep a per ucontext counter of the total
number of active mmu notifiers. We only enable new umems when all the
running notifiers complete.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Shachar Raindel <raindel@mellanox.com>
Signed-off-by: Haggai Eran <haggaie@mellanox.com>
Signed-off-by: Yuval Dagan <yuvalda@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
2014-12-15 18:13:36 -08:00
..
addr.c IB/core: Ethernet L2 attributes in verbs/cm structures 2014-01-14 14:20:54 -08:00
agent.c IB/mad: add new ioctl to ABI to support new registration options 2014-08-10 20:36:00 -07:00
agent.h
cache.c IB/core: Add ib_find_exact_cached_pkey() 2012-09-30 20:33:30 -07:00
cm_msgs.h IB/core: Move CM_xxx_ATTR_ID macros from cm_msgs.h to ib_cm.h 2012-07-08 18:05:06 -07:00
cm.c IB/mad: add new ioctl to ABI to support new registration options 2014-08-10 20:36:00 -07:00
cma.c RDMA/core: Add support for iWARP Port Mapper user space service 2014-06-10 10:11:45 -07:00
core_priv.h IB/core: Resolve Ethernet L2 addresses when modifying QP 2014-01-19 15:14:04 -08:00
device.c IB/core: Handle table with full and partial membership for the same P_Key 2012-09-30 20:33:29 -07:00
fmr_pool.c hlist: drop the node parameter from iterators 2013-02-27 19:10:24 -08:00
iwcm.c RDMA/iwcm: Use a default listen backlog if needed 2014-08-05 07:33:24 -07:00
iwcm.h
iwpm_msg.c RDMA/core: Add support for iWARP Port Mapper user space service 2014-06-10 10:11:45 -07:00
iwpm_util.c RDMA/core: Add support for iWARP Port Mapper user space service 2014-06-10 10:11:45 -07:00
iwpm_util.h RDMA/core: Add support for iWARP Port Mapper user space service 2014-06-10 10:11:45 -07:00
mad_priv.h IB/mad: Update module to [pr|dev]_* style print messages 2014-08-10 20:35:39 -07:00
mad_rmpp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
mad_rmpp.h
mad.c IB/mad: Add user space RMPP support 2014-08-10 20:36:00 -07:00
Makefile IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
multicast.c infiniband: add in export.h for files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:35 -04:00
netlink.c RDMA/core: Add support for iWARP Port Mapper user space service 2014-06-10 10:11:45 -07:00
packer.c infiniband: add in export.h for files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:35 -04:00
sa_query.c IB/mad: add new ioctl to ABI to support new registration options 2014-08-10 20:36:00 -07:00
sa.h
smi.c IB/mad: Check hop count field in directed route MAD to avoid array overflow 2009-09-05 20:24:10 -07:00
smi.h
sysfs.c IB/core: Fix kobject leak on device register error flow 2014-06-05 09:37:10 -07:00
ucm.c IB/core: convert to idr_alloc() 2013-02-27 19:10:16 -08:00
ucma.c IB/cma: IBoE (RoCE) IP-based GID addressing 2014-01-18 14:12:35 -08:00
ud_header.c infiniband: add in export.h for files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:35 -04:00
umem_odp.c IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
umem_rbtree.c IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
umem.c IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
user_mad.c IB/mad: Add user space RMPP support 2014-08-10 20:36:00 -07:00
uverbs_cmd.c IB/core: Implement support for MMU notifiers regarding on demand paging regions 2014-12-15 18:13:36 -08:00
uverbs_main.c IB/core: Add support for on demand paging regions 2014-12-15 18:13:36 -08:00
uverbs_marshall.c IB/core: When marshaling uverbs path, clear unused fields 2014-09-22 09:46:52 -07:00
uverbs.h IB/core: Add support for extended query device caps 2014-12-15 18:13:35 -08:00
verbs.c IB/core: Fix sparse warnings about redeclared functions 2014-06-04 10:01:42 -07:00