[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6c1fba15-f03f-e520-d41d-eff0b2ecdab2@linux.alibaba.com>
Date: Wed, 25 Nov 2020 21:43:22 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: Tejun Heo <tj@...nel.org>
Cc: axboe@...nel.dk, baolin.wang7@...il.com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/7] blk-iocost: Factor out the base vrate change into a
separate function
> Hello,
>
> On Tue, Nov 24, 2020 at 11:33:36AM +0800, Baolin Wang wrote:
>> @@ -2320,45 +2358,11 @@ static void ioc_timer_fn(struct timer_list *timer)
>> ioc->busy_level = clamp(ioc->busy_level, -1000, 1000);
>>
>> if (ioc->busy_level > 0 || (ioc->busy_level < 0 && !nr_lagging)) {
>> - u64 vrate = ioc->vtime_base_rate;
>> - u64 vrate_min = ioc->vrate_min, vrate_max = ioc->vrate_max;
> ...
>> + trace_iocost_ioc_vrate_adj(ioc, ioc->vtime_base_rate,
>> + missed_ppm, rq_wait_pct,
>> nr_lagging, nr_shortages);
>> -
>> - ioc->vtime_base_rate = vrate;
>> - ioc_refresh_margins(ioc);
>> } else if (ioc->busy_level != prev_busy_level || nr_lagging) {
>> trace_iocost_ioc_vrate_adj(ioc, atomic64_read(&ioc->vtime_rate),
>> missed_ppm, rq_wait_pct, nr_lagging,
>
> I think it'd be better to factor out the surrounding if/else block together
OK.
> (as early exit if blocks). Also, how about ioc_adjust_base_vrate()?
Sure, will rename it in next version. Thanks.
Powered by blists - more mailing lists