mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 02:46:55 +07:00
ocfs2_dlm: Call cond_resched_lock() once per hash bucket scan
In dlm_migrate_all_locks(), we currently call cond_resched_lock() after processing each lockres in a hash bucket. Move it outside the loop so as to call it only after the entire hash bucket has been processed. Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
This commit is contained in:
parent
756a1501dd
commit
0d01af6e5d
@ -430,11 +430,10 @@ static int dlm_migrate_all_locks(struct dlm_ctxt *dlm)
|
|||||||
|
|
||||||
dlm_lockres_put(res);
|
dlm_lockres_put(res);
|
||||||
|
|
||||||
cond_resched_lock(&dlm->spinlock);
|
|
||||||
|
|
||||||
if (dropped)
|
if (dropped)
|
||||||
goto redo_bucket;
|
goto redo_bucket;
|
||||||
}
|
}
|
||||||
|
cond_resched_lock(&dlm->spinlock);
|
||||||
num += n;
|
num += n;
|
||||||
mlog(0, "%s: touched %d lockreses in bucket %d "
|
mlog(0, "%s: touched %d lockreses in bucket %d "
|
||||||
"(tot=%d)\n", dlm->name, n, i, num);
|
"(tot=%d)\n", dlm->name, n, i, num);
|
||||||
|
Loading…
Reference in New Issue
Block a user