diff options
author | NeilBrown <neilb@suse.de> | 2025-02-18 18:39:36 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-03-10 16:11:07 +0300 |
commit | 56221b42d71781e49dcead6ed34b0766daecf90d (patch) | |
tree | ae48e73ebe5db1210c66e63f194b4a3744d17dd2 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 64912122a4f86f8c7e232c5b92482b46364c40a2 (diff) | |
download | linux-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 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions