Skip to content

Commit

Permalink
blk-throttle: remove more latency dead-code
Browse files Browse the repository at this point in the history
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 <linux@treblig.org>
Link: https://lore.kernel.org/r/20240727155824.1000042-1-linux@treblig.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
Dr. David Alan Gilbert authored and Jens Axboe committed Jul 27, 2024
1 parent f6bb525 commit 01aa8c8
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 01aa8c8

Please sign in to comment.