mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #14348 from rzarzynski/wip-bs-bitmap-no-virts-in-hotspot
os/bluestore: avoid the VTABLE-related burden in BitMapAllocator's hotspot Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
c43faf1dd2
@ -323,7 +323,7 @@ BitMapZone::~BitMapZone()
|
||||
inline bool BitMapZone::is_exhausted()
|
||||
{
|
||||
/* BitMapZone::get_used_blocks operates atomically. No need for lock. */
|
||||
return get_used_blocks() == size();
|
||||
return BitMapZone::get_used_blocks() == BitMapZone::size();
|
||||
}
|
||||
|
||||
bool BitMapZone::is_allocated(int64_t start_block, int64_t num_blocks)
|
||||
@ -989,7 +989,7 @@ inline bool BitMapAreaLeaf::child_check_n_lock(BitMapZone* const child,
|
||||
/* The exhausted check can be performed without acquiring the lock. This
|
||||
* is because 1) BitMapZone::is_exhausted() actually operates atomically
|
||||
* and 2) it's followed by the exclusive, required-aware re-verification. */
|
||||
if (child->is_exhausted()) {
|
||||
if (child->BitMapZone::is_exhausted()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -348,7 +348,7 @@ public:
|
||||
static void incr_count() { count++;}
|
||||
static int64_t get_total_blocks() {return total_blocks;}
|
||||
bool is_allocated(int64_t start_block, int64_t num_blocks) override;
|
||||
bool is_exhausted() override;
|
||||
bool is_exhausted() override final;
|
||||
void reset_marker();
|
||||
|
||||
int64_t sub_used_blocks(int64_t num_blocks) override;
|
||||
@ -356,8 +356,8 @@ public:
|
||||
bool reserve_blocks(int64_t num_blocks) override;
|
||||
void unreserve(int64_t num_blocks, int64_t allocated) override;
|
||||
int64_t get_reserved_blocks() override;
|
||||
int64_t get_used_blocks() override;
|
||||
int64_t size() override {
|
||||
int64_t get_used_blocks() override final;
|
||||
int64_t size() override final {
|
||||
return get_total_blocks();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user