]> 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)
commit8608e2265f6734bc6e5d72f8f765c1b43fa85a50
treed139d59e0826080269b22b243829a6e298c3a62c
parent17043b55735d805cb33d0c66fb266faf6ecf4e59
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