android_kernel_xiaomi_sm8350/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
..
clntlock.c
clntproc.c
host.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
Makefile
mon.c SUNRPC: RPC buffer size estimates are too large 2007-04-30 22:17:10 -07:00
svc4proc.c [PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addresses 2007-02-12 09:48:36 -08:00
svc.c Replace remaining references to "driverfs" with "sysfs". 2007-02-17 19:13:42 +01:00
svclock.c
svcproc.c [PATCH] knfsd: SUNRPC: Provide room in svc_rqst for larger addresses 2007-02-12 09:48:36 -08:00
svcshare.c
svcsubs.c
xdr4.c SUNRPC: RPC buffer size estimates are too large 2007-04-30 22:17:10 -07:00
xdr.c SUNRPC: RPC buffer size estimates are too large 2007-04-30 22:17:10 -07:00