diff options
author | Baolin Wang <baolin.wang@linux.alibaba.com> | 2020-09-07 11:10:16 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-09-15 04:36:54 +0300 |
commit | 4599ea49d4b00a6fbaab2977e7f8359cfc7e8916 (patch) | |
tree | 032a33e3a4b59e25808143d21a430c4b12eaf0cc /net/key | |
parent | e675df2adc2f0b8cbc0c64111d55b69f7253cbed (diff) | |
download | linux-4599ea49d4b00a6fbaab2977e7f8359cfc7e8916.tar.xz |
blk-throttle: Avoid calculating bps/iops limitation repeatedly
The tg_may_dispatch() will call tg_with_in_bps_limit() and
tg_with_in_iops_limit() to check if we can dispatch a bio or
not, which will calculate bps/iops limitation multiple times.
But tg_may_dispatch() is always called under queue lock, which
means the bps/iops limitation will not change in tg_may_dispatch().
So we can calculate the bps/iops limitation only once, and pass
them to tg_with_in_bps_limit() and tg_with_in_iops_limit() to
avoid calculating bps/iops limitation repeatedly.
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/key')
0 files changed, 0 insertions, 0 deletions