lkml.org 
[lkml]   [2022]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] blk-throttle: remove THROTL_TG_HAS_IOPS_LIMIT
On Wed, Sep 21, 2022 at 05:53:08PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
>
> Currently, "tg->has_rules" and "tg->flags & THROTL_TG_HAS_IOPS_LIMIT"
> both try to bypass bios that don't need to be throttled, however, they are
> a little redundant and both not perfect:
>
> 1) "tg->has_rules" only distinguish read and write, but not iops and bps
> limit.
> 2) "tg->flags & THROTL_TG_HAS_IOPS_LIMIT" only check if iops limit
> exist, read and write is not distinguished, and bps limit is not
> checked.
>
> tg->has_rules will extended to distinguish bps and iops in the following
> patch. There is no need to keep the flag.
>
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>

Acked-by: Tejun Heo <tj@kernel.org>

> @@ -183,11 +182,6 @@ static inline bool blk_throtl_bio(struct bio *bio)
> {
> struct throtl_grp *tg = blkg_to_tg(bio->bi_blkg);
>
> - /* no need to throttle bps any more if the bio has been throttled */
> - if (bio_flagged(bio, BIO_BPS_THROTTLED) &&
> - !(tg->flags & THROTL_TG_HAS_IOPS_LIMIT))
> - return false;
> -

This temporary removal would break the double accounting until the next
patch, right? That might be worth noting but this looks like an okay way to
go about it.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2022-09-24 05:32    [W:0.049 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site