Hi,
This patch set did some improvements for blk throttle, please
help to review. Thanks.
Changes from v1:
- Add another 4 new patches in this patch set.
Baolin Wang (8):
blk-throttle: Remove a meaningless parameter for
throtl_downgrade_state()
blk-throttle: Avoid getting the current time if tg->last_finish_time
is 0
blk-throttle: Avoid tracking latency if low limit is invalid
blk-throttle: Fix IO hang for a corner case
blk-throttle: Move the list operation after list validation
blk-throttle: Move service tree validation out of the
throtl_rb_first()
blk-throttle: Open code __throtl_de/enqueue_tg()
blk-throttle: Re-use the throtl_set_slice_end()
block/blk-throttle.c | 69 ++++++++++++++++++++++++++--------------------------
1 file changed, 35 insertions(+), 34 deletions(-)
--
1.8.3.1
Re-use throtl_set_slice_end() to remove duplicate code.
Signed-off-by: Baolin Wang <[email protected]>
---
block/blk-throttle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index fc5c14f..b771c42 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -808,7 +808,7 @@ static inline void throtl_set_slice_end(struct throtl_grp *tg, bool rw,
static inline void throtl_extend_slice(struct throtl_grp *tg, bool rw,
unsigned long jiffy_end)
{
- tg->slice_end[rw] = roundup(jiffy_end, tg->td->throtl_slice);
+ throtl_set_slice_end(tg, rw, jiffy_end);
throtl_log(&tg->service_queue,
"[%c] extend slice start=%lu end=%lu jiffies=%lu",
rw == READ ? 'R' : 'W', tg->slice_start[rw],
--
1.8.3.1
On 10/7/20 9:52 PM, Baolin Wang wrote:
> Hi,
>
> This patch set did some improvements for blk throttle, please
> help to review. Thanks.
>
> Changes from v1:
> - Add another 4 new patches in this patch set.
>
> Baolin Wang (8):
> blk-throttle: Remove a meaningless parameter for
> throtl_downgrade_state()
> blk-throttle: Avoid getting the current time if tg->last_finish_time
> is 0
> blk-throttle: Avoid tracking latency if low limit is invalid
> blk-throttle: Fix IO hang for a corner case
> blk-throttle: Move the list operation after list validation
> blk-throttle: Move service tree validation out of the
> throtl_rb_first()
> blk-throttle: Open code __throtl_de/enqueue_tg()
> blk-throttle: Re-use the throtl_set_slice_end()
>
> block/blk-throttle.c | 69 ++++++++++++++++++++++++++--------------------------
> 1 file changed, 35 insertions(+), 34 deletions(-)
LGTM, applied, thanks.
--
Jens Axboe