]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Adjust the amount of readahead performed by NFS readdir
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 7 Feb 2022 18:37:00 +0000 (13:37 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 2 Mar 2022 13:43:38 +0000 (08:43 -0500)
commit61b42e7ec038d655365f529633cee8536c1209c4
treed139d59e0826080269b22b243829a6e298c3a62c
parente230d54d1528b074d440082002f32ff337379680
NFS: Adjust the amount of readahead performed by NFS readdir

The current NFS readdir code will always try to maximise the amount of
readahead it performs on the assumption that we can cache anything that
isn't immediately read by the process.
There are several cases where this assumption breaks down, including
when the 'ls -l' heuristic kicks in to try to force use of readdirplus
as a batch replacement for lookup/getattr.

This patch therefore tries to tone down the amount of readahead we
perform, and adjust it to try to match the amount of data being
requested by user space.

Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/dir.c
include/linux/nfs_fs.h