diff options
author | Tom Tucker <tom@opengridcomputing.com> | 2008-05-06 12:49:05 -0400 |
---|---|---|
committer | Tom Tucker <tom@opengridcomputing.com> | 2008-05-19 08:33:53 -0400 |
commit | 47698e083e40bbd3ef87f5561390ae33abb13cd0 (patch) | |
tree | 116427837fc578ad419068306e94adb2daa8fdb1 | |
parent | 8740767376b32a7772607e1b2b07cde0c24120cc (diff) |
svcrdma: Shrink scope of spinlock on RQ CQ
The rq_cq_reap function is only called from the dto_tasklet. The
only resource shared with other threads is the sc_rq_dto_q. Move the
spin lock to protect only this list.
Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_transport.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index 817cf4de746c..78303f0fad92 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -292,7 +292,6 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt) | |||
292 | ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP); | 292 | ib_req_notify_cq(xprt->sc_rq_cq, IB_CQ_NEXT_COMP); |
293 | atomic_inc(&rdma_stat_rq_poll); | 293 | atomic_inc(&rdma_stat_rq_poll); |
294 | 294 | ||
295 | spin_lock_bh(&xprt->sc_rq_dto_lock); | ||
296 | while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) { | 295 | while ((ret = ib_poll_cq(xprt->sc_rq_cq, 1, &wc)) > 0) { |
297 | ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; | 296 | ctxt = (struct svc_rdma_op_ctxt *)(unsigned long)wc.wr_id; |
298 | ctxt->wc_status = wc.status; | 297 | ctxt->wc_status = wc.status; |
@@ -303,9 +302,10 @@ static void rq_cq_reap(struct svcxprt_rdma *xprt) | |||
303 | svc_rdma_put_context(ctxt, 1); | 302 | svc_rdma_put_context(ctxt, 1); |
304 | continue; | 303 | continue; |
305 | } | 304 | } |
305 | spin_lock_bh(&xprt->sc_rq_dto_lock); | ||
306 | list_add_tail(&ctxt->dto_q, &xprt->sc_rq_dto_q); | 306 | list_add_tail(&ctxt->dto_q, &xprt->sc_rq_dto_q); |
307 | spin_unlock_bh(&xprt->sc_rq_dto_lock); | ||
307 | } | 308 | } |
308 | spin_unlock_bh(&xprt->sc_rq_dto_lock); | ||
309 | 309 | ||
310 | if (ctxt) | 310 | if (ctxt) |
311 | atomic_inc(&rdma_stat_rq_prod); | 311 | atomic_inc(&rdma_stat_rq_prod); |