Skip to content

Commit dedbeba

Browse files
committed
os/bluestore: remove bluefs max_alloc perf counters
New PerfCounters::tinc_save_max() call is used since now. Signed-off-by: Igor Fedotov <[email protected]>
1 parent c826e15 commit dedbeba

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

src/os/bluestore/BlueFS.cc

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -457,18 +457,6 @@ void BlueFS::_init_logger()
457457
"Average allocation latency for primary/shared device",
458458
"bsal",
459459
PerfCountersBuilder::PRIO_USEFUL);
460-
b.add_time(l_bluefs_wal_alloc_max_lat, "alloc_wal_max_lat",
461-
"Max allocation latency for wal device",
462-
"awxt",
463-
PerfCountersBuilder::PRIO_INTERESTING);
464-
b.add_time(l_bluefs_db_alloc_max_lat, "alloc_db_max_lat",
465-
"Max allocation latency for db device",
466-
"adxt",
467-
PerfCountersBuilder::PRIO_INTERESTING);
468-
b.add_time(l_bluefs_slow_alloc_max_lat, "alloc_slow_max_lat",
469-
"Max allocation latency for primary/shared device",
470-
"asxt",
471-
PerfCountersBuilder::PRIO_INTERESTING);
472460

473461
logger = b.create_perf_counters();
474462
cct->get_perfcounters_collection()->add(logger);
@@ -4355,25 +4343,13 @@ void BlueFS::_update_allocate_stats(uint8_t id, const ceph::timespan& d)
43554343
{
43564344
switch(id) {
43574345
case BDEV_SLOW:
4358-
logger->tinc(l_bluefs_slow_alloc_lat, d);
4359-
if (d > max_alloc_lat[id]) {
4360-
logger->tset(l_bluefs_slow_alloc_max_lat, utime_t(d));
4361-
max_alloc_lat[id] = d;
4362-
}
4346+
logger->tinc_with_max(l_bluefs_slow_alloc_lat, d);
43634347
break;
43644348
case BDEV_DB:
4365-
logger->tinc(l_bluefs_db_alloc_lat, d);
4366-
if (d > max_alloc_lat[id]) {
4367-
logger->tset(l_bluefs_db_alloc_max_lat, utime_t(d));
4368-
max_alloc_lat[id] = d;
4369-
}
4349+
logger->tinc_with_max(l_bluefs_db_alloc_lat, d);
43704350
break;
43714351
case BDEV_WAL:
4372-
logger->tinc(l_bluefs_wal_alloc_lat, d);
4373-
if (d > max_alloc_lat[id]) {
4374-
logger->tset(l_bluefs_wal_alloc_max_lat, utime_t(d));
4375-
max_alloc_lat[id] = d;
4376-
}
4352+
logger->tinc_with_max(l_bluefs_wal_alloc_lat, d);
43774353
break;
43784354
}
43794355
}

src/os/bluestore/BlueFS.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,6 @@ enum {
8686
l_bluefs_wal_alloc_lat,
8787
l_bluefs_db_alloc_lat,
8888
l_bluefs_slow_alloc_lat,
89-
l_bluefs_wal_alloc_max_lat,
90-
l_bluefs_db_alloc_max_lat,
91-
l_bluefs_slow_alloc_max_lat,
9289
l_bluefs_last,
9390
};
9491

@@ -557,8 +554,6 @@ class BlueFS {
557554
l_bluefs_max_bytes_db,
558555
};
559556

560-
ceph::timespan max_alloc_lat[MAX_BDEV] = {ceph::make_timespan(0)};
561-
562557
// cache
563558
struct {
564559
ceph::mutex lock = ceph::make_mutex("BlueFS::nodes.lock");

0 commit comments

Comments
 (0)