Skip to content

Commit 01aa8c8

Browse files
Dr. David Alan Gilbertaxboe
authored andcommitted
blk-throttle: remove more latency dead-code
The struct 'latency_bucket' and the #define 'request_bucket_index' are unused since commit bf20ab5 ("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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent f6bb525 commit 01aa8c8

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

block/blk-throttle.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ static struct workqueue_struct *kthrotld_workqueue;
3131

3232
#define rb_entry_tg(node) rb_entry((node), struct throtl_grp, rb_node)
3333

34-
/* We measure latency for request size from <= 4k to >= 1M */
35-
#define LATENCY_BUCKET_SIZE 9
36-
37-
struct latency_bucket {
38-
unsigned long total_latency; /* ns / 1024 */
39-
int samples;
40-
};
41-
4234
struct throtl_data
4335
{
4436
/* service tree for active throtl groups */
@@ -116,9 +108,6 @@ static unsigned int tg_iops_limit(struct throtl_grp *tg, int rw)
116108
return tg->iops[rw];
117109
}
118110

119-
#define request_bucket_index(sectors) \
120-
clamp_t(int, order_base_2(sectors) - 3, 0, LATENCY_BUCKET_SIZE - 1)
121-
122111
/**
123112
* throtl_log - log debug message via blktrace
124113
* @sq: the service_queue being reported

0 commit comments

Comments
 (0)