diff options
author | NeilBrown <neilb@suse.de> | 2025-02-18 18:39:37 +0300 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-03-10 16:11:08 +0300 |
commit | fbfdc9fc0f66e7877a6d1a6e44c6acac46c5b811 (patch) | |
tree | c583d008199ac460b3a28f2629d743f7729d107f /rust/helpers/helpers.c | |
parent | 56221b42d71781e49dcead6ed34b0766daecf90d (diff) | |
download | linux-fbfdc9fc0f66e7877a6d1a6e44c6acac46c5b811.tar.xz |
nfsd: filecache: drop the list_lru lock during lock gc scans
Under a high NFSv3 load with lots of different files being accessed,
the LRU list of garbage-collectable files can become quite long.
Asking list_lru_scan_node() to scan the whole list can result in a long
period during which a spinlock is held, blocking the addition of new LRU
items.
So ask list_lru_scan_node() to scan only a few entries at a time, and
repeat until the scan is complete.
If the shrinker runs between two consecutive calls of
list_lru_scan_node() it could invalidate the "remaining" counter which
could lead to premature freeing. So add a spinlock to avoid that.
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