]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
os/bluestore: reduce meaningless flush
authortangwenjun <tang.wenjun3@zte.com.cn>
Mon, 20 Nov 2017 02:33:07 +0000 (10:33 +0800)
committertangwenjun <tang.wenjun3@zte.com.cn>
Fri, 1 Dec 2017 05:53:31 +0000 (13:53 +0800)
no need to flush when there is no summitted aio

Signed-off-by: tangwenjun <tang.wenjun3@zte.com.cn>
src/os/bluestore/BlueStore.cc

index 3c2c348b1c38e944fb1d519beb20d3267638a44b..9401e69c60684971f4459dfda2e2d9729ce4a7d1 100644 (file)
@@ -8550,8 +8550,13 @@ void BlueStore::_kv_sync_thread()
        } else if (deferred_aggressive) {
          force_flush = true;
        }
-      } else
-       force_flush = true;
+      } else {
+       if (aios || !deferred_done.empty()) {
+         force_flush = true;
+       } else {
+         dout(20) << __func__ << " skipping flush (no aios, no deferred_done)" << dendl;
+       }
+      }
 
       if (force_flush) {
        dout(20) << __func__ << " num_aios=" << aios