From: Sage Weil Date: Fri, 3 Jan 2014 20:51:15 +0000 (-0800) Subject: osdc/ObjectCacher: back off less during flush X-Git-Tag: v0.77~47^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e2ee52879e9de260abbf5eacbdabbd71973a6a83;p=ceph.git osdc/ObjectCacher: back off less during flush 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 --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 81335b7957f3..d518c6efaaed 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -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;