blk-mq: Remove the hctx 'run' debugfs attribute
authorBart Van Assche <bvanassche@acm.org>
Wed, 17 Jan 2024 20:36:09 +0000 (12:36 -0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 17 Jan 2024 21:16:34 +0000 (14:16 -0700)
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>
block/blk-mq-debugfs.c
block/blk-mq-sched.c
include/linux/blk-mq.h

index 5cbeb9344f2f5cea3121197892a412deab777838..94668e72ab09bf0922c8d79846a87d91fdbeb1ba 100644 (file)
@@ -479,23 +479,6 @@ out:
        return res;
 }
 
-static int hctx_run_show(void *data, struct seq_file *m)
-{
-       struct blk_mq_hw_ctx *hctx = data;
-
-       seq_printf(m, "%lu\n", hctx->run);
-       return 0;
-}
-
-static ssize_t hctx_run_write(void *data, const char __user *buf, size_t count,
-                             loff_t *ppos)
-{
-       struct blk_mq_hw_ctx *hctx = data;
-
-       hctx->run = 0;
-       return count;
-}
-
 static int hctx_active_show(void *data, struct seq_file *m)
 {
        struct blk_mq_hw_ctx *hctx = data;
@@ -624,7 +607,6 @@ static const struct blk_mq_debugfs_attr blk_mq_debugfs_hctx_attrs[] = {
        {"tags_bitmap", 0400, hctx_tags_bitmap_show},
        {"sched_tags", 0400, hctx_sched_tags_show},
        {"sched_tags_bitmap", 0400, hctx_sched_tags_bitmap_show},
-       {"run", 0600, hctx_run_show, hctx_run_write},
        {"active", 0400, hctx_active_show},
        {"dispatch_busy", 0400, hctx_dispatch_busy_show},
        {"type", 0400, hctx_type_show},
index 67c95f31b15bb1e16c022efe644dcb0900ef12f6..451a2c1f1f32186989160ed6e77e87cb8d14f4f1 100644 (file)
@@ -324,8 +324,6 @@ void blk_mq_sched_dispatch_requests(struct blk_mq_hw_ctx *hctx)
        if (unlikely(blk_mq_hctx_stopped(hctx) || blk_queue_quiesced(q)))
                return;
 
-       hctx->run++;
-
        /*
         * A return of -EAGAIN is an indication that hctx->dispatch is not
         * empty and we must run again in order to avoid starving flushes.
index a676e116085f331ed8bb03208ce7f744a8376f21..7a8150a5f051339f680b9df83fa78da48b8c8af1 100644 (file)
@@ -391,9 +391,6 @@ struct blk_mq_hw_ctx {
         */
        struct blk_mq_tags      *sched_tags;
 
-       /** @run: Number of dispatched requests. */
-       unsigned long           run;
-
        /** @numa_node: NUMA node the storage adapter has been connected to. */
        unsigned int            numa_node;
        /** @queue_num: Index of this hardware queue. */