diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2022-09-13 00:22:44 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2022-09-26 21:02:42 +0300 |
commit | 3fdc546462348b8a497c72bc894e0cde9f10fc40 (patch) | |
tree | 15f67ac9422cad82f2a4db00bf10bae6bb27aad3 /fs/nfsd/nfs4proc.c | |
parent | 103cc1fafee48adb91fca0e19deb869fd23e46ab (diff) | |
download | linux-3fdc546462348b8a497c72bc894e0cde9f10fc40.tar.xz |
NFSD: Reduce amount of struct nfsd4_compoundargs that needs clearing
Have SunRPC clear everything except for the iops array. Then have
each NFSv4 XDR decoder clear it's own argument before decoding.
Now individual operations may have a large argument struct while not
penalizing the vast majority of operations with a small struct.
And, clearing the argument structure occurs as the argument fields
are initialized, enabling the CPU to do write combining on that
memory. In some cases, clearing is not even necessary because all
of the fields in the argument structure are initialized by the
decoder.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 66a99827c7aa..bb22f53c7ba9 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -3596,7 +3596,7 @@ static const struct svc_procedure nfsd_procedures4[2] = { .pc_decode = nfs4svc_decode_compoundargs, .pc_encode = nfs4svc_encode_compoundres, .pc_argsize = sizeof(struct nfsd4_compoundargs), - .pc_argzero = sizeof(struct nfsd4_compoundargs), + .pc_argzero = offsetof(struct nfsd4_compoundargs, iops), .pc_ressize = sizeof(struct nfsd4_compoundres), .pc_release = nfsd4_release_compoundargs, .pc_cachetype = RC_NOCACHE, |