Skip to content

Commit 49e6033

Browse files
bvanasscheaxboe
authored andcommitted
blk-mq: Remove the hctx 'run' debugfs attribute
Nobody uses the debugfs hctx 'run' attribute. Hence remove this attribute and also the code that updates the corresponding member variable. Suggested-by: Jens Axboe <axboe@kernel.dk> Cc: Gabriel Ryan <gabe@cs.columbia.edu> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://lore.kernel.org/r/20240117203609.4122520-1-bvanassche@acm.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 78fbb92 commit 49e6033

File tree

3 files changed

+0
-23
lines changed

3 files changed

+0
-23
lines changed

block/blk-mq-debugfs.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -479,23 +479,6 @@ static int hctx_sched_tags_bitmap_show(void *data, struct seq_file *m)
479479
return res;
480480
}
481481

482-
static int hctx_run_show(void *data, struct seq_file *m)
483-
{
484-
struct blk_mq_hw_ctx *hctx = data;
485-
486-
seq_printf(m, "%lu\n", hctx->run);
487-
return 0;
488-
}
489-
490-
static ssize_t hctx_run_write(void *data, const char __user *buf, size_t count,
491-
loff_t *ppos)
492-
{
493-
struct blk_mq_hw_ctx *hctx = data;
494-
495-
hctx->run = 0;
496-
return count;
497-
}
498-
499482
static int hctx_active_show(void *data, struct seq_file *m)
500483
{
501484
struct blk_mq_hw_ctx *hctx = data;
@@ -624,7 +607,6 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_hctx_attrs[] = {
624607
{"tags_bitmap", 0400, hctx_tags_bitmap_show},
625608
{"sched_tags", 0400, hctx_sched_tags_show},
626609
{"sched_tags_bitmap", 0400, hctx_sched_tags_bitmap_show},
627-
{"run", 0600, hctx_run_show, hctx_run_write},
628610
{"active", 0400, hctx_active_show},
629611
{"dispatch_busy", 0400, hctx_dispatch_busy_show},
630612
{"type", 0400, hctx_type_show},

block/blk-mq-sched.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -324,8 +324,6 @@ void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
324324
if (unlikely(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q)))
325325
return;
326326

327-
hctx->run++;
328-
329327
/*
330328
* A return of -EAGAIN is an indication that hctx->dispatch is not
331329
* empty and we must run again in order to avoid starving flushes.

include/linux/blk-mq.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -391,9 +391,6 @@ struct blk_mq_hw_ctx {
391391
*/
392392
struct blk_mq_tags *sched_tags;
393393

394-
/** @run: Number of dispatched requests. */
395-
unsigned long run;
396-
397394
/** @numa_node: NUMA node the storage adapter has been connected to. */
398395
unsigned int numa_node;
399396
/** @queue_num: Index of this hardware queue. */

0 commit comments

Comments
 (0)