]> git.baikalelectronics.ru Git - kernel.git/commit
IB/qib: Use RCU for qpn lookup
authorMike Marciniszyn <mike.marciniszyn@qlogic.com>
Fri, 23 Sep 2011 17:16:44 +0000 (13:16 -0400)
committerRoland Dreier <roland@purestorage.com>
Fri, 21 Oct 2011 16:38:54 +0000 (09:38 -0700)
commit0ad8c751e8338a5b628ccafc5bdb688181beb939
tree01ed5c508274adc6e46f99d4091fffe70632711f
parent855047da4cab5670463567b9f70048cad5529e46
IB/qib: Use RCU for qpn lookup

The heavy weight spinlock in qib_lookup_qpn() is replaced with RCU.
The hash list itself is now accessed via jhash functions instead of mod.

The changes should benefit multiple receive contexts in different
processors by not contending for the lock just to read the hash
structures.

The patch also adds a lookaside_qp (pointer) and a lookaside_qpn in
the context.  The interrupt handler will test the current packet's qpn
against lookaside_qpn if the lookaside_qp pointer is non-NULL.  The
pointer is NULL'ed when the interrupt handler exits.

Signed-off-by: Mike Marciniszyn <mike.marciniszyn@qlogic.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/qib/qib.h
drivers/infiniband/hw/qib/qib_driver.c
drivers/infiniband/hw/qib/qib_qp.c
drivers/infiniband/hw/qib/qib_verbs.c
drivers/infiniband/hw/qib/qib_verbs.h