summaryrefslogtreecommitdiff
path: root/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2023-12-11 10:24:15 -0500
committerChuck Lever <chuck.lever@oracle.com>2024-01-07 17:54:32 -0500
commit2a95ce479e681b35e385da0f1a6adf7c6240ddce (patch)
tree85560a81d606491177a8ed88457b2e846191fa72 /net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
parent28ee0ec8948ac235327a1f5472fc032b308284a3 (diff)
downloadlinux-2a95ce479e681b35e385da0f1a6adf7c6240ddce.tar.gz
linux-2a95ce479e681b35e385da0f1a6adf7c6240ddce.tar.bz2
linux-2a95ce479e681b35e385da0f1a6adf7c6240ddce.zip
svcrdma: Optimize svc_rdma_cc_init()
The atomic_inc_return() in svc_rdma_send_cid_init() is expensive. Some svc_rdma_chunk_ctxt's now reside in long-lived container structures. They don't need a fresh completion ID for every I/O operation. 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index ac6351e292c5..38f01652dc6d 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -123,7 +123,7 @@ svc_rdma_recv_ctxt_alloc(struct svcxprt_rdma *rdma)
dma_addr_t addr;
void *buffer;
- ctxt = kmalloc_node(sizeof(*ctxt), GFP_KERNEL, node);
+ ctxt = kzalloc_node(sizeof(*ctxt), GFP_KERNEL, node);
if (!ctxt)
goto fail0;
buffer = kmalloc_node(rdma->sc_max_req_size, GFP_KERNEL, node);