public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] blk-mq: Remove the hctx 'run' debugfs attribute
@ 2024-01-17 20:36 Bart Van Assche
  2024-01-17 21:17 ` Jens Axboe
  2024-01-18  6:13 ` Hannes Reinecke
  0 siblings, 2 replies; 3+ messages in thread
From: Bart Van Assche @ 2024-01-17 20:36 UTC (permalink / raw)
  To: Jens Axboe
  Cc: linux-block, Damien Le Moal, Christoph Hellwig, Bart Van Assche,
	Gabriel Ryan

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>
---
 block/blk-mq-debugfs.c | 18 ------------------
 block/blk-mq-sched.c   |  2 --
 include/linux/blk-mq.h |  3 ---
 3 files changed, 23 deletions(-)

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 5cbeb9344f2f..94668e72ab09 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -479,23 +479,6 @@ static int hctx_sched_tags_bitmap_show(void *data, struct seq_file *m)
 	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},
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index 67c95f31b15b..451a2c1f1f32 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -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.
diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
index a676e116085f..7a8150a5f051 100644
--- a/include/linux/blk-mq.h
+++ b/include/linux/blk-mq.h
@@ -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. */

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] blk-mq: Remove the hctx 'run' debugfs attribute
  2024-01-17 20:36 [PATCH] blk-mq: Remove the hctx 'run' debugfs attribute Bart Van Assche
@ 2024-01-17 21:17 ` Jens Axboe
  2024-01-18  6:13 ` Hannes Reinecke
  1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2024-01-17 21:17 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: linux-block, Damien Le Moal, Christoph Hellwig, Gabriel Ryan


On Wed, 17 Jan 2024 12:36:09 -0800, Bart Van Assche wrote:
> Nobody uses the debugfs hctx 'run' attribute. Hence remove this
> attribute and also the code that updates the corresponding member
> variable.
> 
> 

Applied, thanks!

[1/1] blk-mq: Remove the hctx 'run' debugfs attribute
      commit: 49e60333d743ae32db3bdde2f93bc818482dd741

Best regards,
-- 
Jens Axboe




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] blk-mq: Remove the hctx 'run' debugfs attribute
  2024-01-17 20:36 [PATCH] blk-mq: Remove the hctx 'run' debugfs attribute Bart Van Assche
  2024-01-17 21:17 ` Jens Axboe
@ 2024-01-18  6:13 ` Hannes Reinecke
  1 sibling, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2024-01-18  6:13 UTC (permalink / raw)
  To: Bart Van Assche, Jens Axboe
  Cc: linux-block, Damien Le Moal, Christoph Hellwig, Gabriel Ryan

On 1/17/24 21:36, Bart Van Assche wrote:
> 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>
> ---
>   block/blk-mq-debugfs.c | 18 ------------------
>   block/blk-mq-sched.c   |  2 --
>   include/linux/blk-mq.h |  3 ---
>   3 files changed, 23 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), GF: Ivo Totev, Andrew McDonald,
Werner Knoblich


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-18  6:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 20:36 [PATCH] blk-mq: Remove the hctx 'run' debugfs attribute Bart Van Assche
2024-01-17 21:17 ` Jens Axboe
2024-01-18  6:13 ` Hannes Reinecke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox