diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-12-29 15:55:17 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-01-25 09:36:28 -0500 |
commit | 22df5a22462e836ccb30634c3a52602091179a73 (patch) | |
tree | 26ac5784c1285499b0a1598cba5a3eab27658ebe /net/sunrpc/xprtrdma/svc_rdma_rw.c | |
parent | df971cd853c05778ae1175e8aeb80a04bb9d4be5 (diff) | |
download | lwn-22df5a22462e836ccb30634c3a52602091179a73.tar.gz lwn-22df5a22462e836ccb30634c3a52602091179a73.zip |
svcrdma: Convert rdma_stat_sq_starve to a per-CPU counter
Avoid the overhead of a memory bus lock cycle for counting a value
that is hardly every used.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'net/sunrpc/xprtrdma/svc_rdma_rw.c')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_rw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_rw.c b/net/sunrpc/xprtrdma/svc_rdma_rw.c index 0b63e1321d74..d7d98b2df00b 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_rw.c +++ b/net/sunrpc/xprtrdma/svc_rdma_rw.c @@ -364,6 +364,7 @@ static int svc_rdma_post_chunk_ctxt(struct svc_rdma_chunk_ctxt *cc) return 0; } + percpu_counter_inc(&svcrdma_stat_sq_starve); trace_svcrdma_sq_full(rdma); atomic_add(cc->cc_sqecount, &rdma->sc_sq_avail); wait_event(rdma->sc_send_wait, |