Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bart Van Assche and committed by
Jens Axboe
49e60333 78fbb92a

-23
-18
block/blk-mq-debugfs.c
··· 479 479 return res; 480 480 } 481 481 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 - 499 482 static int hctx_active_show(void *data, struct seq_file *m) 500 483 { 501 484 struct blk_mq_hw_ctx *hctx = data; ··· 607 624 {"tags_bitmap", 0400, hctx_tags_bitmap_show}, 608 625 {"sched_tags", 0400, hctx_sched_tags_show}, 609 626 {"sched_tags_bitmap", 0400, hctx_sched_tags_bitmap_show}, 610 - {"run", 0600, hctx_run_show, hctx_run_write}, 611 627 {"active", 0400, hctx_active_show}, 612 628 {"dispatch_busy", 0400, hctx_dispatch_busy_show}, 613 629 {"type", 0400, hctx_type_show},
-2
block/blk-mq-sched.c
··· 324 324 if (unlikely(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q))) 325 325 return; 326 326 327 - hctx->run++; 328 - 329 327 /* 330 328 * A return of -EAGAIN is an indication that hctx->dispatch is not 331 329 * empty and we must run again in order to avoid starving flushes.
-3
include/linux/blk-mq.h
··· 391 391 */ 392 392 struct blk_mq_tags *sched_tags; 393 393 394 - /** @run: Number of dispatched requests. */ 395 - unsigned long run; 396 - 397 394 /** @numa_node: NUMA node the storage adapter has been connected to. */ 398 395 unsigned int numa_node; 399 396 /** @queue_num: Index of this hardware queue. */