Skip to contentSkip to conversation

blk-mq-debugfs: Show active requests per queue for shared tags

PATCH Applied John Garry 2 participants 2 messages Oct 29, 2021 Block layer

lore
Share & tools
lore

John Garry

author
#0 lore raw

PATCH 1/1 blk-mq-debugfs: Show active requests per queue for shared tags

Currently we show the hctx.active value for the per-hctx "active" file.

However this is not maintained for shared tags, and we instead keep a record of the number active requests per request queue - see commit f1b49fdc1c64 ("blk-mq: Record active_queues_shared_sbitmap per tag_set for when using shared sbitmap).

Change for the case of shared tags to show the active requests per request queue by using __blk_mq_active_requests() helper.

block/blk-mq-debugfs.c +1 -1
index 68ca5d21cda7..0f8c60e9c719 100644
@@ -550,7 +550,7 @@ static int hctx_active_show(void *data, struct seq_file *m)
 {
 	struct blk_mq_hw_ctx *hctx = data;
 
-	seq_printf(m, "%d\n", atomic_read(&hctx->nr_active));
+	seq_printf(m, "%d\n", __blk_mq_active_requests(hctx));
 	return 0;
 }
 
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 8 lines · John Garry

Currently we show the hctx.active value for the per-hctx "active" file.

However this is not maintained for shared tags, and we instead keep a record of the number active requests per request queue - see commit f1b49fdc1c64 ("blk-mq: Record active_queues_shared_sbitmap per tag_set for when using shared sbitmap).

[...]

Applied, thanks!

[1/1] blk-mq-debugfs: Show active requests per queue for shared tags

      commit: 9b84c629c90374498ab5825dede74a06ea1c775b

Best regards,

Signature · 1 line
Jens Axboe