diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2020-12-29 15:47:44 -0500 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2021-01-25 09:36:28 -0500 |
commit | df971cd853c05778ae1175e8aeb80a04bb9d4be5 (patch) | |
tree | 90179b120aa5fcfcfacc44439ffbb0e2a1ae16f2 /net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | |
parent | 59a00257c66c2d7b3db21245287711ea6c745e7c (diff) | |
download | linux-df971cd853c05778ae1175e8aeb80a04bb9d4be5.tar.gz linux-df971cd853c05778ae1175e8aeb80a04bb9d4be5.tar.bz2 linux-df971cd853c05778ae1175e8aeb80a04bb9d4be5.zip |
svcrdma: Convert rdma_stat_recv to a per-CPU counter
Receives are frequent events. 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_recvfrom.c')
-rw-r--r-- | net/sunrpc/xprtrdma/svc_rdma_recvfrom.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c index cbdb71247755..7d14a74df716 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c @@ -845,8 +845,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp) } list_del(&ctxt->rc_list); spin_unlock(&rdma_xprt->sc_rq_dto_lock); - - atomic_inc(&rdma_stat_recv); + percpu_counter_inc(&svcrdma_stat_recv); svc_rdma_build_arg_xdr(rqstp, ctxt); |