diff options
author | Alexander Aring <aahringo@redhat.com> | 2024-04-15 20:39:41 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2024-04-16 21:40:27 +0200 |
commit | b1f2381c1a8d52b973944090ed8b42c750152533 (patch) | |
tree | efc6ae5b11b6cce09887c967ff392c0247834fdb /fs/dlm/member.c | |
parent | dlm: do not use ref counts for rsb in the toss state (diff) | |
download | linux-b1f2381c1a8d52b973944090ed8b42c750152533.tar.xz linux-b1f2381c1a8d52b973944090ed8b42c750152533.zip |
dlm: drop dlm_scand kthread and use timers
Currently the scand kthread acts like a garbage collection for expired
rsbs on toss list, to clean them up after a certain timeout. It triggers
every couple of seconds and iterates over the toss list while holding
ls_rsbtbl_lock for the whole hash bucket iteration.
To reduce the amount of time holding ls_rsbtbl_lock, we now handle the
disposal of expired rsbs using a per-lockspace timer that expires for the
earliest tossed rsb on the lockspace toss queue. This toss queue is
ordered according to the rsb res_toss_time with the earliest tossed rsb
as the first entry. The toss timer will only trylock() necessary locks,
since it is low priority garbage collection, and will rearm the timer
if trylock() fails. If the timer function does not find any expired
rsb's, it rearms the timer with the next earliest expired rsb.
Signed-off-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/member.c')
-rw-r--r-- | fs/dlm/member.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/dlm/member.c b/fs/dlm/member.c index 6401916a97ef..c46e306f2e5c 100644 --- a/fs/dlm/member.c +++ b/fs/dlm/member.c @@ -641,6 +641,8 @@ int dlm_ls_stop(struct dlm_ls *ls) spin_lock_bh(&ls->ls_recover_lock); set_bit(LSFL_RECOVER_STOP, &ls->ls_flags); new = test_and_clear_bit(LSFL_RUNNING, &ls->ls_flags); + if (new) + timer_delete_sync(&ls->ls_timer); ls->ls_recover_seq++; /* activate requestqueue and stop processing */ |