diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2012-06-27 18:33:19 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-07-08 18:05:19 -0700 |
commit | 8aac4cc3a9d7d7c2f203b7a8db521b604cfb5dc9 (patch) | |
tree | f9e98f1fd7df79a1577c77d74b7242fa16b9a74d /drivers/infiniband/hw/qib/qib_mr.c | |
parent | 6a82649f217023863d6b1740017e6c3dd6685327 (diff) | |
download | linux-8aac4cc3a9d7d7c2f203b7a8db521b604cfb5dc9.tar.gz linux-8aac4cc3a9d7d7c2f203b7a8db521b604cfb5dc9.tar.bz2 linux-8aac4cc3a9d7d7c2f203b7a8db521b604cfb5dc9.zip |
IB/qib: RCU locking for MR validation
Profiling indicates that MR validation locking is expensive. The MR
table is largely read-only and is a suitable candidate for RCU locking.
The patch uses RCU locking during validation to eliminate one
lock/unlock during that validation.
Reviewed-by: Mike Heinz <michael.william.heinz@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_mr.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_mr.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qib/qib_mr.c b/drivers/infiniband/hw/qib/qib_mr.c index 6a2028a56e3d..e6687ded8210 100644 --- a/drivers/infiniband/hw/qib/qib_mr.c +++ b/drivers/infiniband/hw/qib/qib_mr.c @@ -527,3 +527,10 @@ int qib_dealloc_fmr(struct ib_fmr *ibfmr) out: return ret; } + +void mr_rcu_callback(struct rcu_head *list) +{ + struct qib_mregion *mr = container_of(list, struct qib_mregion, list); + + complete(&mr->comp); +} |