[Ocfs2-commits] smushran commits r3052 -
branches/ocfs2-1.2.5/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Jul 30 13:01:47 PDT 2007
Author: smushran
Date: 2007-07-30 13:01:46 -0700 (Mon, 30 Jul 2007)
New Revision: 3052
Modified:
branches/ocfs2-1.2.5/fs/ocfs2/dlm/dlmdomain.c
Log:
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. We are moving it to outside the
loop so as to call it only after the entire hash bucket has been processed.
This allows us to work around the limitation in the 2.6.9 kernel whereby
callers to cond_resched_lock() are not informed whether the spinlock was
dropped or not allowing the umount thread to race the dlm_thread, that
is also scanning the same hash buckets and pruning unused lockres'.
Signed-off-by: mfasheh
Modified: branches/ocfs2-1.2.5/fs/ocfs2/dlm/dlmdomain.c
===================================================================
--- branches/ocfs2-1.2.5/fs/ocfs2/dlm/dlmdomain.c 2007-07-30 19:59:58 UTC (rev 3051)
+++ branches/ocfs2-1.2.5/fs/ocfs2/dlm/dlmdomain.c 2007-07-30 20:01:46 UTC (rev 3052)
@@ -411,11 +411,10 @@
spin_unlock(&res->spinlock);
dlm_lockres_put(res);
- cond_resched_lock(&dlm->spinlock);
-
if (dropped)
goto redo_bucket;
}
+ cond_resched_lock(&dlm->spinlock);
num += n;
mlog(0, "%s: touched %d lockreses in bucket %d "
"(tot=%d)\n", dlm->name, n, i, num);
More information about the Ocfs2-commits
mailing list