[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200804142409.GB4819@mtj.thefacebook.com>
Date: Tue, 4 Aug 2020 10:24:09 -0400
From: Tejun Heo <tj@...nel.org>
To: Chengming Zhou <zhouchengming@...edance.com>
Cc: axboe@...nel.dk, linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iocost: Only inc nr_shortages when have io waited
On Sun, Aug 02, 2020 at 01:00:21AM +0800, Chengming Zhou wrote:
> The last else branch of current code may have not io waited in iocg,
> in which case we should not inc nr_shortages, or the device vrate
> will speed up even this iocg is not shortage of vtime.
>
> Signed-off-by: Chengming Zhou <zhouchengming@...edance.com>
> ---
> block/blk-iocost.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/block/blk-iocost.c b/block/blk-iocost.c
> index 86ba6fd254e1..ce68b5749364 100644
> --- a/block/blk-iocost.c
> +++ b/block/blk-iocost.c
> @@ -1485,7 +1485,7 @@ static void ioc_timer_fn(struct timer_list *timer)
> __propagate_active_weight(iocg, iocg->weight,
> new_inuse);
> }
> - } else {
> + } else if (waitqueue_active(&iocg->waitq)) {
This is intentional. Shortage doesn't necessarily mean that there are
waiters right now. If there are cgroups which don't have enough headroom to
donate and the device is hitting the latency targets, it makes sense to ramp
up vrate as those cgroups are likely to get throttled.
Thanks.
--
tejun
Powered by blists - more mailing lists