summaryrefslogtreecommitdiff
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2025-02-18 18:39:32 +0300
committerChuck Lever <chuck.lever@oracle.com>2025-03-10 16:11:05 +0300
commit1601e2fde937a8abf29c9f62743d22c3eaeccb58 (patch)
tree1259b62764e831c4d5695901edc2cbbd89a3c960 /rust/helpers/helpers.c
parentf77ce2e5708b3201244fcc61e4a22acb44fd919b (diff)
downloadlinux-1601e2fde937a8abf29c9f62743d22c3eaeccb58.tar.xz
NFSD: Re-organize nfsd_file_gc_worker()
Dave opines: IMO, there is no need to do this unnecessary work on every object that is added to the LRU. Changing the gc worker to always run every 2s and check if it has work to do like so: static void nfsd_file_gc_worker(struct work_struct *work) { - nfsd_file_gc(); - if (list_lru_count(&nfsd_file_lru)) - nfsd_file_schedule_laundrette(); + if (list_lru_count(&nfsd_file_lru)) + nfsd_file_gc(); + nfsd_file_schedule_laundrette(); } means that nfsd_file_gc() will be run the same way and have the same behaviour as the current code. When the system it idle, it does a list_lru_count() check every 2 seconds and goes back to sleep. That's going to be pretty much unnoticable on most machines that run NFS servers. Suggested-by: Dave Chinner <david@fromorbit.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions