]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: sleep in progress thread if laggy and waiting_for_nolaggy waiters 2463/head
authorSage Weil <sage@redhat.com>
Thu, 11 Sep 2014 05:51:20 +0000 (22:51 -0700)
committerSage Weil <sage@redhat.com>
Thu, 11 Sep 2014 15:35:49 +0000 (08:35 -0700)
If we have nolaggy waiters but are laggy we want to sleep.  Otherwise,
we will just spin and spam the log ...

Signed-off-by: Sage Weil <sage@redhat.com>
src/mds/MDS.cc

index 1247c5771a82b039a61d4a712e6b8936b6790103..d797b3df2ae57d894ab03e271813beb947e02344 100644 (file)
@@ -2390,7 +2390,9 @@ void *MDS::ProgressThread::entry()
 {
   Mutex::Locker l(mds->mds_lock);
   while (true) {
-    while (!stopping && (mds->finished_queue.empty() && mds->waiting_for_nolaggy.empty())) {
+    while (!stopping &&
+          mds->finished_queue.empty() &&
+          (mds->waiting_for_nolaggy.empty() || mds->beacon.is_laggy())) {
       cond.Wait(mds->mds_lock);
     }