From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Qais Yousef <qais.yousef@arm.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Beata Michalska <Beata.Michalska@arm.com>,
Ionela Voinescu <ionela.voinescu@arm.com>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] sched/uclamp: Fix iowait boost escaping uclamp restriction
Date: Fri, 17 Dec 2021 16:56:33 +0100 [thread overview]
Message-ID: <CAJZ5v0gHNS-UDBs2cGX9j7t_+YHTdqiEC0PT9XY-5=ddGZ53iQ@mail.gmail.com> (raw)
In-Reply-To: <20211216225320.2957053-3-qais.yousef@arm.com>
On Thu, Dec 16, 2021 at 11:53 PM Qais Yousef <qais.yousef@arm.com> wrote:
>
> iowait_boost signal is applied independently of util and doesn't take
> into account uclamp settings of the rq. An io heavy task that is capped
> by uclamp_max could still request higher frequency because
> sugov_iowait_apply() doesn't clamp the boost via uclamp_rq_util_with()
> like effective_cpu_util() does.
>
> Make sure that iowait_boost honours uclamp requests by calling
> uclamp_rq_util_with() when applying the boost.
>
> Fixes: 982d9cdc22c9 ("sched/cpufreq, sched/uclamp: Add clamps for FAIR and RT tasks")
> Signed-off-by: Qais Yousef <qais.yousef@arm.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
> kernel/sched/cpufreq_schedutil.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
> index 48327970552a..93dcea233c65 100644
> --- a/kernel/sched/cpufreq_schedutil.c
> +++ b/kernel/sched/cpufreq_schedutil.c
> @@ -289,6 +289,7 @@ static void sugov_iowait_apply(struct sugov_cpu *sg_cpu, u64 time)
> * into the same scale so we can compare.
> */
> boost = (sg_cpu->iowait_boost * sg_cpu->max) >> SCHED_CAPACITY_SHIFT;
> + boost = uclamp_rq_util_with(cpu_rq(sg_cpu->cpu), boost, NULL);
> if (sg_cpu->util < boost)
> sg_cpu->util = boost;
> }
> --
> 2.25.1
>
next prev parent reply other threads:[~2021-12-17 15:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-16 22:53 [PATCH 0/2] uclamp_max vs schedutil fixes Qais Yousef
2021-12-16 22:53 ` [PATCH 1/2] sched/sugov: Ignore 'busy' filter when rq is capped by uclamp_max Qais Yousef
2021-12-17 15:54 ` Rafael J. Wysocki
2021-12-20 10:48 ` Qais Yousef
2022-01-28 7:40 ` [tip: sched/core] " tip-bot2 for Qais Yousef
2021-12-16 22:53 ` [PATCH 2/2] sched/uclamp: Fix iowait boost escaping uclamp restriction Qais Yousef
2021-12-17 15:56 ` Rafael J. Wysocki [this message]
2022-01-28 7:40 ` [tip: sched/core] " tip-bot2 for Qais Yousef
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='CAJZ5v0gHNS-UDBs2cGX9j7t_+YHTdqiEC0PT9XY-5=ddGZ53iQ@mail.gmail.com' \
--to=rafael@kernel.org \
--cc=Beata.Michalska@arm.com \
--cc=dietmar.eggemann@arm.com \
--cc=ionela.voinescu@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=qais.yousef@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).