]> git.ipfire.org Git - thirdparty/linux.git/commit
svcrdma: Pre-allocate svc_rdma_recv_ctxt objects
authorChuck Lever <chuck.lever@oracle.com>
Tue, 21 Nov 2023 16:40:20 +0000 (11:40 -0500)
committerChuck Lever <chuck.lever@oracle.com>
Sun, 7 Jan 2024 22:54:26 +0000 (17:54 -0500)
commit877118c667abe0df7e4d7b0607f77806a9d2df91
treecf3f365d51c7ff7fe2dae11da3f391d469a72ffd
parentb541dd554bc0442f7ff8c6cab6c5460c044913c8
svcrdma: Pre-allocate svc_rdma_recv_ctxt objects

The original reason for allocating svc_rdma_recv_ctxt objects during
Receive completion was to ensure the objects were allocated on the
NUMA node closest to the underlying IB device.

Since commit c5d68d25bd6b ("svcrdma: Clean up allocation of
svc_rdma_recv_ctxt"), however, the device's favored node is
explicitly passed to the memory allocator.

To enable switching Receive completion to soft IRQ context, move
memory allocation out of completion handling, since it can be
costly, and it can sleep.

A limited number of objects is now allocated at "accept" time.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c