Whamcloud - gitweb
Branch b1_8
authorjohann <johann>
Thu, 10 Dec 2009 22:31:04 +0000 (22:31 +0000)
committerjohann <johann>
Thu, 10 Dec 2009 22:31:04 +0000 (22:31 +0000)
b=19557
i=adilger
i=andrew

add cond_resched() calls to lustre_hash_for_each_empty() to avoid hogging
the cpu when many locks to process on disconnect/eviction.

lustre/ChangeLog
lustre/obdclass/class_hash.c
lustre/obdclass/genops.c
lustre/ptlrpc/service.c

index 5e213cd..6f6e4ae 100644 (file)
@@ -242,6 +242,13 @@ Description: bad entry in directory xxx: inode out of bounds
 Details    : fix locking issue in the rename path which could race with any
             other operations updating the same directory.
 
+Severity   : normal
+Bugzilla   : 19557
+Description: BUG: soft lockup - CPU#1 stuck for 10s! [ll_mdt_07:4523]
+Details    : add cond_resched() calls to avoid hogging the cpu for too long
+            in the hash code.
+
+
 -------------------------------------------------------------------------------
 2009-10-16 Sun Microsystems, Inc.
        * version 1.8.1.1
index 762aebf..2e51f27 100644 (file)
@@ -524,6 +524,7 @@ restart:
                         lh_read_unlock(lh);
                         func(obj, data);
                         (void)lh_put(lh, hnode);
+                        cfs_cond_resched();
                         goto restart;
                 }
                 write_unlock(&lhb->lhb_rwlock);
index 3136e66..743746e 100644 (file)
@@ -1472,7 +1472,7 @@ void obd_zombie_impexp_cull(void)
 
                 if (export != NULL)
                         class_export_destroy(export);
-
+                cfs_cond_resched();
         } while (import != NULL || export != NULL);
 }
 
index 5714aad..0a0fb2a 100644 (file)
@@ -1650,7 +1650,7 @@ static int ptlrpc_main(void *arg)
 
                 lc_watchdog_disable(thread->t_watchdog);
 
-                cond_resched();
+                cfs_cond_resched();
 
                 l_wait_event_exclusive (svc->srv_waitq,
                               ((thread->t_flags & SVC_STOPPING) != 0 &&