From d5956937297fa50c1b989587b5825cf69c4560cb Mon Sep 17 00:00:00 2001 From: johann Date: Thu, 10 Dec 2009 22:31:04 +0000 Subject: [PATCH] Branch b1_8 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 | 7 +++++++ lustre/obdclass/class_hash.c | 1 + lustre/obdclass/genops.c | 2 +- lustre/ptlrpc/service.c | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 5e213cd..6f6e4ae 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -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 diff --git a/lustre/obdclass/class_hash.c b/lustre/obdclass/class_hash.c index 762aebf..2e51f27 100644 --- a/lustre/obdclass/class_hash.c +++ b/lustre/obdclass/class_hash.c @@ -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); diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c index 3136e66..743746e 100644 --- a/lustre/obdclass/genops.c +++ b/lustre/obdclass/genops.c @@ -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); } diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c index 5714aad..0a0fb2a 100644 --- a/lustre/ptlrpc/service.c +++ b/lustre/ptlrpc/service.c @@ -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 && -- 1.8.3.1