mirror of
https://github.com/ceph/ceph
synced 2025-03-31 16:25:56 +00:00
Merge pull request #18854 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:
commit
3eeb632dc0
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user