Linux cgroups development
 help / color / mirror / Atom feed
* [PATCH] blk-throttle: remove more latency dead-code
@ 2024-07-27 15:58 linux
  2024-07-27 16:34 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: linux @ 2024-07-27 15:58 UTC (permalink / raw)
  To: tj, josef, axboe
  Cc: cgroups, linux-block, linux-kernel, Dr. David Alan Gilbert

From: "Dr. David Alan Gilbert" <linux@treblig.org>

The struct 'latency_bucket' and the #define 'request_bucket_index'
are unused since
commit bf20ab538c81 ("blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW")

and the 'LATENCY_BUCKET_SIZE' #define was only used by the
'request_bucket_index' define.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
---
 block/blk-throttle.c | 11 -----------
 1 file changed, 11 deletions(-)

diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index dc6140fa3de0..6943ec720f39 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -31,14 +31,6 @@ static struct workqueue_struct *kthrotld_workqueue;
 
 #define rb_entry_tg(node)	rb_entry((node), struct throtl_grp, rb_node)
 
-/* We measure latency for request size from <= 4k to >= 1M */
-#define LATENCY_BUCKET_SIZE 9
-
-struct latency_bucket {
-	unsigned long total_latency; /* ns / 1024 */
-	int samples;
-};
-
 struct throtl_data
 {
 	/* service tree for active throtl groups */
@@ -116,9 +108,6 @@ static unsigned int tg_iops_limit(struct throtl_grp *tg, int rw)
 	return tg->iops[rw];
 }
 
-#define request_bucket_index(sectors) \
-	clamp_t(int, order_base_2(sectors) - 3, 0, LATENCY_BUCKET_SIZE - 1)
-
 /**
  * throtl_log - log debug message via blktrace
  * @sq: the service_queue being reported
-- 
2.45.2


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

* Re: [PATCH] blk-throttle: remove more latency dead-code
  2024-07-27 15:58 [PATCH] blk-throttle: remove more latency dead-code linux
@ 2024-07-27 16:34 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2024-07-27 16:34 UTC (permalink / raw)
  To: tj, josef, linux; +Cc: cgroups, linux-block, linux-kernel


On Sat, 27 Jul 2024 16:58:24 +0100, linux@treblig.org wrote:
> The struct 'latency_bucket' and the #define 'request_bucket_index'
> are unused since
> commit bf20ab538c81 ("blk-throttle: remove CONFIG_BLK_DEV_THROTTLING_LOW")
> 
> and the 'LATENCY_BUCKET_SIZE' #define was only used by the
> 'request_bucket_index' define.
> 
> [...]

Applied, thanks!

[1/1] blk-throttle: remove more latency dead-code
      commit: 01aa8c869d0cdaf603f42dc1d2302b164c25353a

Best regards,
-- 
Jens Axboe




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

end of thread, other threads:[~2024-07-27 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-27 15:58 [PATCH] blk-throttle: remove more latency dead-code linux
2024-07-27 16:34 ` Jens Axboe

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