]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/ObjectCacher: back off less during flush 1038/head
authorSage Weil <sage@inktank.com>
Fri, 3 Jan 2014 20:51:15 +0000 (12:51 -0800)
committerSage Weil <sage@inktank.com>
Fri, 3 Jan 2014 20:51:15 +0000 (12:51 -0800)
In cce990efc8f2a58c8d0fa11c234ddf2242b1b856 we added a limit to avoid
holding the lock for too long.  However, if we back off, we currently
wait for a full second, which is probably a bit much--we really just want
to give other threads a chance.

Backport: emperor
Signed-off-by: Sage Weil <sage@inktank.com>
src/osdc/ObjectCacher.cc

index 81335b7957f3761a9fc1984da656f1b74792cf07..d518c6efaaedc8978b516e893da067d7f081de62 100644 (file)
@@ -1457,6 +1457,12 @@ void ObjectCacher::flusher_entry()
        ldout(cct, 10) << "flusher flushing aged dirty bh " << *bh << dendl;
        bh_write(bh);
       }
+      if (!max) {
+       // back off the lock to avoid starving other threads
+       lock.Unlock();
+       lock.Lock();
+       continue;
+      }
     }
     if (flusher_stop)
       break;