[Ocfs2-commits] smushran commits r3004 -
branches/ocfs2-1.2/fs/ocfs2/dlm
svn-commits at oss.oracle.com
svn-commits at oss.oracle.com
Mon Apr 16 14:40:58 PDT 2007
Author: smushran
Date: 2007-04-16 14:40:58 -0700 (Mon, 16 Apr 2007)
New Revision: 3004
Modified:
branches/ocfs2-1.2/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 as both
are scanning the hash-ed lockres'.
Signed-off-by: mfasheh
Modified: branches/ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c
===================================================================
--- branches/ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c 2007-04-11 18:36:39 UTC (rev 3003)
+++ branches/ocfs2-1.2/fs/ocfs2/dlm/dlmdomain.c 2007-04-16 21:40:58 UTC (rev 3004)
@@ -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