]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
os/bluestore/BlueStore: optimize WALWQ::flush() 9175/head
authorJianpeng Ma <jianpeng.ma@intel.com>
Mon, 23 May 2016 12:17:53 +0000 (20:17 +0800)
committerJianpeng Ma <jianpeng.ma@intel.com>
Fri, 3 Jun 2016 16:33:34 +0000 (00:33 +0800)
In fact ThreadPool::drain will do
a)wait WorkQueue::empty() is true
b)wait processing thread to complete.
So it can remove the same work which wait WorkQueue::empty().

Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
src/os/bluestore/BlueStore.h

index 2b3bfdc6dbf9f0b1f4dc5207ebb5b09cbc36d263..f43dd18b01c0a5a005306d2a734cbfbd0b53604e 100644 (file)
@@ -749,11 +749,6 @@ public:
     }
 
     void flush() {
-      lock();
-      while (!wal_queue.empty()) {
-       _wait();
-      }
-      unlock();
       drain();
     }
   };