kernel_samsung_a53x/fs/nfsd
Chuck Lever d36f5984df NFSD: Restore NFSv4 decoding's SAVEMEM functionality
[ Upstream commit 7b723008f9c95624c848fad661c01b06e47b20da ]

While converting the NFSv4 decoder to use xdr_stream-based XDR
processing, I removed the old SAVEMEM() macro. This macro wrapped
a bit of logic that avoided a memory allocation by recognizing when
the decoded item resides in a linear section of the Receive buffer.
In that case, it returned a pointer into that buffer instead of
allocating a bounce buffer.

The bounce buffer is necessary only when xdr_inline_decode() has
placed the decoded item in the xdr_stream's scratch buffer, which
disappears the next time xdr_inline_decode() is called with that
xdr_stream. That happens only if the data item crosses a page
boundary in the receive buffer, an exceedingly rare occurrence.

Allocating a bounce buffer every time results in a minor performance
regression that was introduced by the recent NFSv4 decoder overhaul.
Let's restore the previous behavior. On average, it saves about 1.5
kmalloc() calls per COMPOUND.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-19 12:27:28 +01:00
..
acl.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
auth.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
auth.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blocklayout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blocklayoutxdr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
blocklayoutxdr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cache.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
current_stateid.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
export.c nfsd: allow filesystems to opt out of subtree checking 2024-11-19 12:27:26 +01:00
export.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fault_inject.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
filecache.c nfsd: Fix error return code in nfsd_file_cache_init() 2024-11-19 12:27:20 +01:00
filecache.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flexfilelayout.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flexfilelayoutxdr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
flexfilelayoutxdr.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
idmap.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
lockd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
netns.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs2acl.c NFSD: Add common helpers to decode void args and encode void results 2024-11-19 12:27:20 +01:00
nfs3acl.c NFSD: Add common helpers to decode void args and encode void results 2024-11-19 12:27:20 +01:00
nfs3proc.c NFSD: Add common helpers to decode void args and encode void results 2024-11-19 12:27:20 +01:00
nfs3xdr.c nfsd: add a new EXPORT_OP_NOWCC flag to struct export_operations 2024-11-19 12:27:26 +01:00
nfs4acl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs4callback.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs4idmap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs4layouts.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs4proc.c NFSD: Fix sparse warning in nfssvc.c 2024-11-19 12:27:28 +01:00
nfs4recover.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfs4state.c NFSD: Add a helper to decode state_protect4_a 2024-11-19 12:27:24 +01:00
nfs4xdr.c NFSD: Restore NFSv4 decoding's SAVEMEM functionality 2024-11-19 12:27:28 +01:00
nfscache.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfsctl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nfsd.h Revert "nfsd4: support change_attr_type attribute" 2024-11-19 12:27:26 +01:00
nfsfh.c nfsd: Record NFSv4 pre/post-op attributes as non-atomic 2024-11-19 12:27:26 +01:00
nfsfh.h nfsd: Record NFSv4 pre/post-op attributes as non-atomic 2024-11-19 12:27:26 +01:00
nfsproc.c NFSD: Add common helpers to decode void args and encode void results 2024-11-19 12:27:20 +01:00
nfssvc.c NFSD: Fix sparse warning in nfssvc.c 2024-11-19 12:27:28 +01:00
nfsxdr.c NFSD: Add common helpers to decode void args and encode void results 2024-11-19 12:27:20 +01:00
pnfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
state.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stats.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stats.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c NFSD: Add SPDX header for fs/nfsd/trace.c 2024-11-19 12:27:20 +01:00
trace.h NFSD: Add tracepoints in nfsd4_decode/encode_compound() 2024-11-19 12:27:20 +01:00
vfs.c nfsd: Set PF_LOCAL_THROTTLE on local filesystems only 2024-11-19 12:27:26 +01:00
vfs.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xdr.h NFSD: Add common helpers to decode void args and encode void results 2024-11-19 12:27:20 +01:00
xdr3.h NFSD: Add common helpers to decode void args and encode void results 2024-11-19 12:27:20 +01:00
xdr4.h NFSD: Fix sparse warning in nfssvc.c 2024-11-19 12:27:28 +01:00
xdr4cb.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00