summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2025-02-18 18:39:36 +0300
committerChuck Lever <chuck.lever@oracle.com>2025-03-10 16:11:07 +0300
commit56221b42d71781e49dcead6ed34b0766daecf90d (patch)
treeae48e73ebe5db1210c66e63f194b4a3744d17dd2 /rust/helpers/helpers.c
parent64912122a4f86f8c7e232c5b92482b46364c40a2 (diff)
downloadlinux-56221b42d71781e49dcead6ed34b0766daecf90d.tar.xz
nfsd: filecache: don't repeatedly add/remove files on the lru list
There is no need to remove a file from the lru every time we access it, and then add it back. It is sufficient to set the REFERENCED flag every time we put the file. The order in the lru of REFERENCED files is largely irrelevant as they will all be moved to the end. With this patch, files are added only when they are allocated (if want_gc) and they are removed only by the list_lru_(shrink_)walk callback or when forcibly removing a file. This should reduce contention on the list_lru spinlock(s) and reduce memory traffic a little. Signed-off-by: NeilBrown <neilb@suse.de> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions