sm::description("the sum of IOs")),
sm::make_counter("io_blocked_count", stats.io_blocked_count,
sm::description("IOs that are blocked by gc")),
+ sm::make_counter("io_blocked_count_trim", stats.io_blocked_count_trim,
+ sm::description("IOs that are blocked by trimming")),
+ sm::make_counter("io_blocked_count_reclaim", stats.io_blocked_count_reclaim,
+ sm::description("IOs that are blocked by reclaimming")),
sm::make_counter("io_blocked_sum", stats.io_blocked_sum,
sm::description("the sum of blocking IOs")),
uint64_t io_blocking_num = 0;
uint64_t io_count = 0;
uint64_t io_blocked_count = 0;
+ uint64_t io_blocked_count_trim = 0;
+ uint64_t io_blocked_count_reclaim = 0;
uint64_t io_blocked_sum = 0;
uint64_t reclaiming_bytes = 0;
*
* Encapsulates whether block pending gc.
*/
- bool should_block_on_gc() const {
- if (get_dirty_tail_limit() > journal_tail_target) {
- return true;
- }
+ bool should_block_on_trim() const {
+ return get_dirty_tail_limit() > journal_tail_target;
+ }
+
+ bool should_block_on_reclaim() const {
if (get_segments_reclaimable() == 0) {
return false;
}
);
}
+ bool should_block_on_gc() const {
+ return should_block_on_trim() || should_block_on_reclaim();
+ }
+
void log_gc_state(const char *caller) const {
auto &logger = crimson::get_logger(ceph_subsys_seastore_cleaner);
if (logger.is_enabled(seastar::log_level::debug)) {
// The pipeline configuration prevents another IO from entering
// prepare until the prior one exits and clears this.
ceph_assert(!blocked_io_wake);
- bool is_blocked = false;
++stats.io_count;
- if (should_block_on_gc()) {
+ bool is_blocked = false;
+ if (should_block_on_trim()) {
+ is_blocked = true;
+ ++stats.io_blocked_count_trim;
+ }
+ if (should_block_on_reclaim()) {
+ is_blocked = true;
+ ++stats.io_blocked_count_reclaim;
+ }
+ if (is_blocked) {
++stats.io_blocking_num;
++stats.io_blocked_count;
stats.io_blocked_sum += stats.io_blocking_num;
- is_blocked = true;
}
return seastar::do_until(
[this] {