WSL2-Linux-Kernel/fs/lockd
Chuck Lever 2bea90d43a SUNRPC: RPC buffer size estimates are too large
The RPC buffer size estimation logic in net/sunrpc/clnt.c always
significantly overestimates the requirements for the buffer size.
A little instrumentation demonstrated that in fact rpc_malloc was never
allocating the buffer from the mempool, but almost always called kmalloc.

To compute the size of the RPC buffer more precisely, split p_bufsiz into
two fields; one for the argument size, and one for the result size.

Then, compute the sum of the exact call and reply header sizes, and split
the RPC buffer precisely between the two.  That should keep almost all RPC
buffers within the 2KiB buffer mempool limit.

And, we can finally be rid of RPC_SLACK_SPACE!

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2007-04-30 22:17:10 -07:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
clntlock.c [PATCH] fs/lockd/clntlock.c: add missing newlines to dprintk's 2007-01-30 08:26:45 -08:00
clntproc.c NLM: Fix double free in __nlm_async_call 2007-02-03 15:35:02 -08:00
host.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
mon.c SUNRPC: RPC buffer size estimates are too large 2007-04-30 22:17:10 -07:00
svc.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
svc4proc.c [PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addresses 2007-02-12 09:48:36 -08:00
svclock.c NLM: Fix double free in __nlm_async_call 2007-02-03 15:35:02 -08:00
svcproc.c [PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addresses 2007-02-12 09:48:36 -08:00
svcshare.c [PATCH] getting rid of all casts of k[cmz]alloc() calls 2006-12-13 09:05:58 -08:00
svcsubs.c [PATCH] struct path: convert lockd 2006-12-08 08:28:47 -08:00
xdr.c SUNRPC: RPC buffer size estimates are too large 2007-04-30 22:17:10 -07:00
xdr4.c SUNRPC: RPC buffer size estimates are too large 2007-04-30 22:17:10 -07:00