linux/fs/nfs
Trond Myklebust 230bc98f7a NFS: Improve heuristic for readdirplus
The heuristic for readdirplus is designed to try to detect 'ls -l' and
similar patterns. It does so by looking for cache hit/miss patterns in
both the attribute cache and in the dcache of the files in a given
directory, and then sets a flag for the readdirplus code to interpret.

The problem with this approach is that a single attribute or dcache miss
can cause the NFS code to force a refresh of the attributes for the
entire set of files contained in the directory.

To be able to make a more nuanced decision, let's sample the number of
hits and misses in the set of open directory descriptors. That allows us
to set thresholds at which we start preferring READDIRPLUS over regular
READDIR, or at which we start to force a re-read of the remaining
readdir cache using READDIRPLUS.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
2022-03-02 08:43:38 -05:00
..
blocklayout nfs/blocklayout: use bdev_nr_bytes instead of open coding it 2021-10-18 14:43:23 -06:00
filelayout nfs41: pnfs: filelayout: Replace one-element array with flexible-array member 2022-01-06 14:00:20 -05:00
flexfilelayout NFSv4/flexfiles: Convert GFP_NOFS to GFP_KERNEL 2022-02-25 18:50:12 -05:00
cache_lib.c
cache_lib.h
callback_proc.c NFSv4.2/copyoffload: Convert GFP_NOFS to GFP_KERNEL 2022-02-25 18:50:12 -05:00
callback_xdr.c NFSv4.1: Fix uninitialised variable in devicenotify 2022-01-06 14:00:20 -05:00
callback.c Merge branch 'signal-for-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2022-01-17 05:49:30 +02:00
callback.h NFSv4.1: Fix uninitialised variable in devicenotify 2022-01-06 14:00:20 -05:00
client.c NFS: Fix initialisation of nfs_client cl_flags field 2022-02-08 09:13:49 -05:00
delegation.c NFSv4: Charge NFSv4 open state trackers to kmemcg 2022-02-25 18:50:12 -05:00
delegation.h NFSv4: Fix delegation return in cases where we have to retry 2021-06-13 19:36:27 -04:00
dir.c NFS: Improve heuristic for readdirplus 2022-03-02 08:43:38 -05:00
direct.c nfs: Convert to new fscache volume/cookie API 2022-01-10 11:53:25 +00:00
dns_resolve.c
dns_resolve.h
export.c nfs: block notification on fs with its own ->lock 2022-01-08 14:42:01 -05:00
file.c Convert NFS from readpages to readahead 2022-02-25 15:07:07 -05:00
fs_context.c net: Don't include filter.h from net/sock.h 2021-12-29 08:48:14 -08:00
fscache.c nfs: Implement cache I/O by accessing the cache directly 2022-01-10 11:53:25 +00:00
fscache.h 9p, afs, ceph, nfs: Use current_is_kswapd() rather than gfpflags_allow_blocking() 2022-01-11 22:27:42 +00:00
getroot.c NFS: Remove the nfs4_label argument from nfs_setsecurity 2021-11-05 14:54:40 -04:00
inode.c NFS: Improve heuristic for readdirplus 2022-03-02 08:43:38 -05:00
internal.h NFS: Improve heuristic for readdirplus 2022-03-02 08:43:38 -05:00
io.c NFS: Fix up incorrect documentation 2021-04-05 09:04:20 -04:00
iostat.h
Kconfig nfs: Convert to new fscache volume/cookie API 2022-01-10 11:53:25 +00:00
Makefile nfs: Convert to new fscache volume/cookie API 2022-01-10 11:53:25 +00:00
mount_clnt.c nfs: hornor timeo and retrans option when mounting NFSv3 2021-04-05 09:04:21 -04:00
namespace.c NFS: Remove the label from the nfs4_lookup_res struct 2021-11-05 14:54:39 -04:00
netns.h
nfs2super.c
nfs2xdr.c NFS: Return valid errors from nfs2/3_decode_dirent() 2022-02-28 10:11:32 -05:00
nfs3_fs.h vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
nfs3acl.c vfs: add rcu argument to ->get_acl() callback 2021-08-18 22:08:24 +02:00
nfs3client.c
nfs3proc.c NFS: pass cred explicitly for access tests 2022-01-06 14:00:20 -05:00
nfs3super.c
nfs3xdr.c NFS: Return valid errors from nfs2/3_decode_dirent() 2022-02-28 10:11:32 -05:00
nfs4_fs.h NFSv4 handle port presence in fs_location server string 2022-01-13 09:36:58 -05:00
nfs4client.c nfs: nfs4clinet: check the return value of kstrdup() 2022-01-06 14:00:20 -05:00
nfs4file.c NFSv4.2/copyoffload: Convert GFP_NOFS to GFP_KERNEL 2022-02-25 18:50:12 -05:00
nfs4getroot.c
nfs4idmap.c Fix user namespace leak 2021-10-20 18:09:54 -04:00
nfs4idmap.h
nfs4namespace.c NFSv4 handle port presence in fs_location server string 2022-01-13 09:36:58 -05:00
nfs4proc.c NFS: Clean up NFSv4.2 xattrs 2022-02-25 18:50:13 -05:00
nfs4renewd.c treewide: remove editor modelines and cruft 2021-05-07 00:26:34 -07:00
nfs4session.c NFSv4: Sanity check the parameters in nfs41_update_target_slotid() 2021-11-07 09:23:14 -05:00
nfs4session.h NFSv4: Sanity check the parameters in nfs41_update_target_slotid() 2021-11-07 09:23:14 -05:00
nfs4state.c NFS: Convert GFP_NOFS to GFP_KERNEL 2022-02-25 18:50:12 -05:00
nfs4super.c
nfs4sysctl.c
nfs4trace.c
nfs4trace.h NFSv4.2 add tracepoint to OFFLOAD_CANCEL 2021-11-04 19:43:30 -04:00
nfs4xdr.c NFSv4 remove zero number of fs_locations entries error check 2022-01-12 14:26:05 -05:00
nfs42.h
nfs42proc.c NFSv4.2/copyoffload: Convert GFP_NOFS to GFP_KERNEL 2022-02-25 18:50:12 -05:00
nfs42xattr.c NFSv4.2: Fix up an invalid combination of memory allocation flags 2022-02-25 18:50:12 -05:00
nfs42xdr.c NFSv42: Don't fail clone() unless the OP_CLONE operation failed 2021-11-17 14:08:23 -05:00
nfs.h
nfsroot.c
nfstrace.c NFSv4: Catch and trace server filehandle encoding errors 2021-04-14 09:36:29 -04:00
nfstrace.h NFS: Improve heuristic for readdirplus 2022-03-02 08:43:38 -05:00
pagelist.c SUNRPC: Trace calls to .rpc_call_done 2021-10-20 18:09:54 -04:00
pnfs_dev.c
pnfs_nfs.c NFS: Fix up commit deadlocks 2021-10-20 18:09:45 -04:00
pnfs.c NFS: Convert GFP_NOFS to GFP_KERNEL 2022-02-25 18:50:12 -05:00
pnfs.h NFS: Move NFS protocol display macros to global header 2021-11-02 12:31:23 -04:00
proc.c NFS: NFSv2/v3 clients should never be setting NFS_CAP_XATTR 2022-02-25 18:50:13 -05:00
read.c Convert NFS from readpages to readahead 2022-02-25 15:07:07 -05:00
super.c nfs: Convert to new fscache volume/cookie API 2022-01-10 11:53:25 +00:00
symlink.c
sysctl.c
sysfs.c Revert "NFSv4: use unique client identifiers in network namespaces" 2022-02-28 10:09:23 -05:00
sysfs.h
unlink.c NFS: Fix open coded versions of nfs_set_cache_invalid() 2021-03-08 16:13:55 -05:00
write.c NFS: Use of mapping_set_error() results in spurious errors 2022-02-25 18:50:13 -05:00