From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Tejun Heo <tj@kernel.org>
Cc: axboe@kernel.dk, baolin.wang7@gmail.com,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/7] blk-iocost: Factor out the base vrate change into a separate function
Date: Wed, 25 Nov 2020 21:43:22 +0800 [thread overview]
Message-ID: <6c1fba15-f03f-e520-d41d-eff0b2ecdab2@linux.alibaba.com> (raw)
In-Reply-To: <X75OTmArk6X1pnV6@mtj.duckdns.org>
> 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.
prev parent reply other threads:[~2020-11-25 13:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 3:33 [PATCH 0/7] Some cleanups and improvements for blk-iocost Baolin Wang
2020-11-24 3:33 ` [PATCH 1/7] blk-iocost: Fix some typos in comments Baolin Wang
2020-11-25 11:30 ` Tejun Heo
2020-11-24 3:33 ` [PATCH 2/7] blk-iocost: Remove unnecessary advance declaration Baolin Wang
2020-11-25 11:31 ` Tejun Heo
2020-11-24 3:33 ` [PATCH 3/7] blk-iocost: Just open code the q_name() Baolin Wang
2020-11-25 11:33 ` Tejun Heo
2020-11-25 13:35 ` Baolin Wang
2020-11-24 3:33 ` [PATCH 4/7] blk-iocost: Add a flag to indicate if need update hwi Baolin Wang
2020-11-25 12:14 ` Tejun Heo
2020-11-25 14:15 ` Baolin Wang
2020-11-25 14:35 ` Tejun Heo
2020-11-24 3:33 ` [PATCH 5/7] blk-iocost: Move the usage ratio calculation to the correct place Baolin Wang
2020-11-25 12:19 ` Tejun Heo
2020-11-25 13:36 ` Baolin Wang
2020-11-24 3:33 ` [PATCH 6/7] blk-iocost: Factor out the active iocgs' state check into a separate function Baolin Wang
2020-11-25 12:25 ` Tejun Heo
2020-11-25 13:37 ` Baolin Wang
2020-11-24 3:33 ` [PATCH 7/7] blk-iocost: Factor out the base vrate change " Baolin Wang
2020-11-25 12:30 ` Tejun Heo
2020-11-25 13:43 ` Baolin Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6c1fba15-f03f-e520-d41d-eff0b2ecdab2@linux.alibaba.com \
--to=baolin.wang@linux.alibaba.com \
--cc=axboe@kernel.dk \
--cc=baolin.wang7@gmail.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox