kernel-ark/drivers/infiniband/core
Roland Dreier 9ead190bfd IB/uverbs: Don't serialize with ib_uverbs_idr_mutex
Currently, all userspace verbs operations that call into the kernel
are serialized by ib_uverbs_idr_mutex.  This can be a scalability
issue for some workloads, especially for devices driven by the ipath
driver, which needs to call into the kernel even for datapath
operations.

Fix this by adding reference counts to the userspace objects, and then
converting ib_uverbs_idr_mutex into a spinlock that only protects the
idrs long enough to take a reference on the object being looked up.
Because remove operations may fail, we have to do a slightly funky
two-step deletion, which is described in the comments at the top of
uverbs_cmd.c.

This also still leaves ib_uverbs_idr_lock as a single lock that is
possibly subject to contention.  However, the lock hold time will only
be a single idr operation, so multiple threads should still be able to
make progress, even if ib_uverbs_idr_lock is being ping-ponged.

Surprisingly, these changes even shrink the object code:

add/remove: 23/5 grow/shrink: 4/21 up/down: 633/-693 (-60)

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-06-17 20:44:49 -07:00
..
addr.c
agent.c
agent.h
cache.c IB: Add caching of ports' LMC 2006-06-17 20:37:34 -07:00
cm_msgs.h
cm.c IB/cm: Use address handle helpers 2006-06-17 20:37:40 -07:00
cma.c IB: IP address based RDMA connection manager 2006-06-17 20:37:29 -07:00
core_priv.h
device.c
fmr_pool.c IB/fmr: Use device's max_map_map_per_fmr attribute in FMR pool. 2006-06-17 20:37:37 -07:00
mad_priv.h IB: Make needlessly global ib_mad_cache static 2006-06-17 20:37:31 -07:00
mad_rmpp.c
mad_rmpp.h
mad.c IB/mad: Check GID/LID when matching requests 2006-06-17 20:37:34 -07:00
Makefile IB: IP address based RDMA connection manager 2006-06-17 20:37:29 -07:00
packer.c
sa_query.c IB/cm: Use address handle helpers 2006-06-17 20:37:40 -07:00
smi.c
smi.h
sysfs.c
ucm.c IB/ucm: Get rid of duplicate P_Key parameter 2006-06-17 20:37:39 -07:00
ud_header.c
user_mad.c
uverbs_cmd.c IB/uverbs: Don't serialize with ib_uverbs_idr_mutex 2006-06-17 20:44:49 -07:00
uverbs_main.c IB/uverbs: Don't serialize with ib_uverbs_idr_mutex 2006-06-17 20:44:49 -07:00
uverbs_marshall.c
uverbs_mem.c
uverbs.h IB/uverbs: Don't serialize with ib_uverbs_idr_mutex 2006-06-17 20:44:49 -07:00
verbs.c IB: Add ib_init_ah_from_wc() 2006-06-17 20:37:39 -07:00