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 <sage@redhat.com>
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;
}
{
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();
}
}
osr->drain_preceding(txc);
- osr->kv_drain_preceding_waiters--;
+ --deferred_aggressive;
dout(10) << __func__ << " " << osr << " done" << dendl;
}
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;