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>
This commit is contained in:
Chuck Lever
2020-12-29 15:47:44 -05:00
parent 59a00257c6
commit df971cd853
3 changed files with 54 additions and 7 deletions

View File

@@ -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);