sunrpc: Replace the rq_pages array with dynamically-allocated memory
authorChuck Lever <chuck.lever@oracle.com>
Mon, 28 Apr 2025 19:36:52 +0000 (15:36 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 15 May 2025 20:16:22 +0000 (16:16 -0400)
commited603bcf4feac05df937bf78bc7feb75f988a971
tree4231e67cf297057ea681891f0f9bf9b7804cc635
parent1a58791292ebb58cde3c0c708e41bb063b9dec6f
sunrpc: Replace the rq_pages array with dynamically-allocated memory

As a step towards making NFSD's maximum rsize and wsize variable at
run-time, replace the fixed-size rq_vec[] array in struct svc_rqst
with a chunk of dynamically-allocated memory.

On a system with 8-byte pointers and 4KB pages, pahole reports that
the rq_pages[] array is 2080 bytes. This patch replaces that with
a single 8-byte pointer field.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
include/linux/sunrpc/svc.h
net/sunrpc/svc.c
net/sunrpc/svc_xprt.c
net/sunrpc/xprtrdma/svc_rdma_rw.c