1
0
mirror of https://github.com/ceph/ceph synced 2025-03-31 16:25:56 +00:00

Merge pull request from ifed01/wip-ifed-release-alloc-cleanup3

os/bluestore: avoid excessive ops in _txc_release_alloc

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
This commit is contained in:
Kefu Chai 2017-11-13 12:25:51 +08:00 committed by GitHub
commit 3eeb632dc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8327,17 +8327,11 @@ void BlueStore::_txc_finish(TransContext *txc)
void BlueStore::_txc_release_alloc(TransContext *txc)
{
interval_set<uint64_t> bulk_release_extents;
// it's expected we're called with lazy_release_lock already taken!
if (!cct->_conf->bluestore_debug_no_reuse_blocks) {
if (likely(!cct->_conf->bluestore_debug_no_reuse_blocks)) {
dout(10) << __func__ << " " << txc << " " << txc->released << dendl;
// interval_set seems to be too costly for inserting things in
// bstore_kv_final. We could serialize in simpler format and perform
// the merge separately, maybe even in a dedicated thread.
bulk_release_extents.insert(txc->released);
alloc->release(txc->released);
}
alloc->release(bulk_release_extents);
txc->allocated.clear();
txc->released.clear();
}