diff options
author | Mike Marciniszyn <mike.marciniszyn@qlogic.com> | 2011-09-23 19:16:44 +0200 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2011-10-21 18:38:54 +0200 |
commit | af061a644a0e4d4778fe6cd2246479c1962e153b (patch) | |
tree | 01ed5c508274adc6e46f99d4091fffe70632711f /drivers/infiniband/hw/qib/qib.h | |
parent | IB/qib: Eliminate divide/mod in converting idx to egr buf pointer (diff) | |
download | linux-af061a644a0e4d4778fe6cd2246479c1962e153b.tar.xz linux-af061a644a0e4d4778fe6cd2246479c1962e153b.zip |
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>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib.h')
-rw-r--r-- | drivers/infiniband/hw/qib/qib.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h index 97e623383e1a..b881bdc401f5 100644 --- a/drivers/infiniband/hw/qib/qib.h +++ b/drivers/infiniband/hw/qib/qib.h @@ -223,6 +223,9 @@ struct qib_ctxtdata { /* ctxt rcvhdrq head offset */ u32 head; u32 pkt_count; + /* lookaside fields */ + struct qib_qp *lookaside_qp; + u32 lookaside_qpn; /* QPs waiting for context processing */ struct list_head qp_wait_list; }; |