]> git.ipfire.org Git - thirdparty/linux.git/commit
sunrpc: Replace the rq_bvec array with dynamically-allocated memory
authorChuck Lever <chuck.lever@oracle.com>
Mon, 28 Apr 2025 19:36:54 +0000 (15:36 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Thu, 15 May 2025 20:16:23 +0000 (16:16 -0400)
commit59cf7346542babdaae99e72365174eab4fa276ac
treee3ed4f9849f558a9f51788226665894a5575aa0c
parented603bcf4feac05df937bf78bc7feb75f988a971
sunrpc: Replace the rq_bvec 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_bvec[] array in struct svc_rqst
with a chunk of dynamically-allocated memory.

The rq_bvec[] array contains enough bio_vecs to handle each page in
a maximum size RPC message.

On a system with 8-byte pointers and 4KB pages, pahole reports that
the rq_bvec[] array is 4144 bytes. This patch replaces that array
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/svcsock.c