b.add_time_avg(l_bluestore_allocator_alloc_process_lat,
"alloc_process_lat",
- "Allocator processing latency",
+ "Allocator processing latency while holding lock",
"apl",
PerfCountersBuilder::PRIO_USEFUL);
b.add_time_avg(l_bluestore_allocator_lock_wait_lat,
"Allocator lock wait latency",
"lwl",
PerfCountersBuilder::PRIO_USEFUL);
+ b.add_time_avg(l_bluestore_allocator_nolock_process_lat,
+ "nolock_process_lat",
+ "Allocator lockless fast-path allocation latency",
+ "fpl",
+ PerfCountersBuilder::PRIO_USEFUL);
logger = b.create_perf_counters();
l_bluestore_allocator_first = 732300,
l_bluestore_allocator_alloc_process_lat,
l_bluestore_allocator_lock_wait_lat,
+ l_bluestore_allocator_nolock_process_lat,
l_bluestore_allocator_last
};
max_alloc_size = p2align(uint64_t(cap), (uint64_t)block_size);
}
uint64_t cached_chunk_offs = 0;
+ auto fast_alloc_start = mono_clock::now();
if (cache && cache->try_get(&cached_chunk_offs, want)) {
num_free -= want;
extents->emplace_back(cached_chunk_offs, want);
+ logger->tinc_with_max(
+ l_bluestore_allocator_nolock_process_lat,
+ mono_clock::now() - fast_alloc_start);
return want;
}
auto lock_wait_start = mono_clock::now();