Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/bluestore: unify throttling model #14306

Merged
merged 5 commits into from Apr 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/os/bluestore/BlueStore.cc
Expand Up @@ -7497,8 +7497,6 @@ void BlueStore::_txc_committed_kv(TransContext *txc)
if (!txc->oncommits.empty()) {
finishers[n]->queue(txc->oncommits);
}
throttle_ops.put(txc->ops);
throttle_bytes.put(txc->bytes);
}

void BlueStore::_txc_finish(TransContext *txc)
Expand Down Expand Up @@ -7786,12 +7784,19 @@ void BlueStore::_kv_sync_thread()
}
}
}
if (num_aios) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this check removed?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was an optimization of dubious value (avoid iterating over the list if we know there are no aios), but with the throttle change we have to do the iteration anyway.

for (auto txc : kv_committing) {
if (txc->had_ios) {
--txc->osr->txc_with_unstable_io;
}
for (auto txc : kv_committing) {
if (txc->had_ios) {
--txc->osr->txc_with_unstable_io;
}

// release throttle *before* we commit. this allows new ops
// to be prepared and enter pipeline while we are waiting on
// the kv commit sync/flush. then hopefully on the next
// iteration there will already be ops awake. otherwise, we
// end up going to sleep, and then wake up when the very first
// transaction is ready for commit.
throttle_ops.put(txc->ops);
throttle_bytes.put(txc->bytes);
}

PExtentVector bluefs_gift_extents;
Expand Down