NFSD: Fix the filecache LRU shrinker
authorChuck Lever <chuck.lever@oracle.com>
Fri, 8 Jul 2022 18:25:24 +0000 (14:25 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sat, 30 Jul 2022 00:11:19 +0000 (20:11 -0400)
commitedead3a55804739b2e4af0f35e9c7326264e7b22
treec2d97040a94dcb96f0fed87b0bd62c9213baa576
parent4a0e73e635e3f36b616ad5c943e3d23debe4632f
NFSD: Fix the filecache LRU shrinker

Without LRU item rotation, the shrinker visits only a few items on
the end of the LRU list, and those would always be long-term OPEN
files for NFSv4 workloads. That makes the filecache shrinker
completely ineffective.

Adopt the same strategy as the inode LRU by using LRU_ROTATE.

Suggested-by: Dave Chinner <david@fromorbit.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/filecache.c