From f97a7dcfe7b3c4013d2bf0524dd5852be4bc6c07 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 8 Nov 2019 17:29:03 -0600 Subject: [PATCH] Revert "os/bluestore: add kv_drain_preceding_waiters indicate drain_preceding." This reverts commit ff71ad472e94e14f392c618b6eb5e8608afec94f. This change has two problems: 1- First, we want to be aggressive about deferred IO so that we don't have to wait very long for things to flush. 2- Because we aren't aggressive, when the deferred io does finish, the kv thread isn't woken back up, which means we hang. More generally, I don't think we care about making aggressive mode avoid wakeups, because it is exceedingly rare--it only happens when we are splitting PGs. Fixes: https://tracker.ceph.com/issues/42712 Signed-off-by: Sage Weil --- src/os/bluestore/BlueStore.cc | 7 ++++--- src/os/bluestore/BlueStore.h | 2 -- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/os/bluestore/BlueStore.cc b/src/os/bluestore/BlueStore.cc index c2b77bb47cfb..946d4e9a5b94 100644 --- a/src/os/bluestore/BlueStore.cc +++ b/src/os/bluestore/BlueStore.cc @@ -11280,7 +11280,8 @@ void BlueStore::_txc_finish(TransContext *txc) dout(20) << __func__ << " txc " << txc << " " << txc->get_state_name() << dendl; if (txc->state != TransContext::STATE_DONE) { - if (osr->kv_drain_preceding_waiters && txc->state == TransContext::STATE_PREPARE) { + if (txc->state == TransContext::STATE_PREPARE && + deferred_aggressive) { // for _osr_drain_preceding() notify = true; } @@ -11403,7 +11404,7 @@ void BlueStore::_osr_drain_preceding(TransContext *txc) { OpSequencer *osr = txc->osr.get(); dout(10) << __func__ << " " << txc << " osr " << osr << dendl; - osr->kv_drain_preceding_waiters++; + ++deferred_aggressive; // FIXME: maybe osr-local aggressive flag? { // submit anything pending deferred_lock.lock(); @@ -11422,7 +11423,7 @@ void BlueStore::_osr_drain_preceding(TransContext *txc) } } osr->drain_preceding(txc); - osr->kv_drain_preceding_waiters--; + --deferred_aggressive; dout(10) << __func__ << " " << osr << " done" << dendl; } diff --git a/src/os/bluestore/BlueStore.h b/src/os/bluestore/BlueStore.h index 9baeca021882..8ef013759a45 100644 --- a/src/os/bluestore/BlueStore.h +++ b/src/os/bluestore/BlueStore.h @@ -1763,8 +1763,6 @@ public: std::atomic_int kv_submitted_waiters = {0}; - std::atomic_int kv_drain_preceding_waiters = {0}; - std::atomic_bool zombie = {false}; ///< in zombie_osr set (collection going away) const uint32_t sequencer_id; -- 2.47.3