From: Qais Yousef <qyousef@layalina.io>
To: Hongyan Xia <hongyan.xia2@arm.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Lukasz Luba <lukasz.luba@arm.com>, Wei Wang <wvw@google.com>,
Rick Yiu <rickyiu@google.com>,
Chung-Kai Mei <chungkai@google.com>,
Ingo Molnar <mingo@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>
Subject: Re: [PATCH 3/4] sched/schedutil: Ignore update requests for short running tasks
Date: Tue, 12 Dec 2023 12:23:40 +0000 [thread overview]
Message-ID: <20231212122340.sus7sbfqqkd4dxoh@airbuntu> (raw)
In-Reply-To: <a6c13b56-3ad9-419d-a22c-5a2e302200e0@arm.com>
On 12/11/23 11:15, Hongyan Xia wrote:
> > If the rq->util_avg is 1024, then for any task that is running, the requested
> > frequency should be max. If there's a task that is capped by uclamp_max, then
> > this task should not run at max.
> >
> > So other tasks should have run at max; why you don't want them to run at max?
>
> Because it saves power. If there's a 1024 task capped at 300 and a true 300
> task without uclamp on the same rq, there's no need to run the CPU at more
> than 600. Running it at 1024 ignores the uclamp_max and burns battery when
> it's not needed.
To fix this problem of tasks that are not 1024 but appearing 1024 the solution
doesn't lie on how the combined tasks perf hints are treated.
Note that tasks stuck on a CPU with small capacity (due to affinity or
extremely long balance_interval) can still appear as 1024 the same way
UCLAMP_MAX induces.
> > Is it only the documentation what triggered this concern about this corner
> > case? I'm curious what have you seen.
>
> This is not a corner case. Having a uclamp_max task and a normal task on the
> same rq is fairly common. My concern isn't the 'frequency spike' problem
> from documentation. My concern comes from benchmarks, which is
> high-frequency square waves. An occasional spike isn't worrying, but the
> square waves are.
Fairly common in practice or you synthetic test setup to trigger it? We haven't
hit this problem in practice. Again, the solution is not related to how the
performance hints are applied.
Note if you have busy tasks running and sharing the CPU, the CPU should run at
max for non capped tasks. Please differentiate between the two problems.
>
> > So worth a fix, not related to handling performance requests for multiple
> > tasks, and not urgently needed as nothing is falling apart because of it for
> > the time being at least.
>
> Also, I think there's still an unanswered question. If there's a 1024 task
If there's a 1024 tasks on the rq then it'd run at max frequency and the system
will be overutilized and EAS disabled and work is spread according to load.
Cheers
--
Qais Yousef
> with a uclamp_min of 300 and a 300-util task with default uclamp on the same
> rq, which currently under max aggregation switches between highest and
> lowest OPP, should we filter out the high OPP or the low one? Neither is a
> short-running task. We could designate this as a corner case (though I don't
> think so), but wouldn't it be nice if we don't have any of these problems in
> the first place?
>
> Hongyan
next prev parent reply other threads:[~2023-12-12 12:23 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 1:52 [PATCH 0/4] sched: cpufreq: Remove uclamp max-aggregation Qais Yousef
2023-12-08 1:52 ` [PATCH 1/4] sched/fair: Be less aggressive in calling cpufreq_update_util() Qais Yousef
2023-12-08 10:05 ` Lukasz Luba
2023-12-10 20:51 ` Qais Yousef
2023-12-11 7:56 ` Lukasz Luba
2023-12-12 12:10 ` Qais Yousef
2023-12-14 8:19 ` Lukasz Luba
2023-12-11 18:47 ` Christian Loehle
2023-12-12 12:34 ` Qais Yousef
2023-12-12 13:09 ` Christian Loehle
2023-12-12 13:29 ` Qais Yousef
2023-12-12 10:46 ` Dietmar Eggemann
2023-12-12 12:35 ` Qais Yousef
2023-12-12 18:22 ` Hongyan Xia
2023-12-12 10:47 ` Hongyan Xia
2023-12-12 11:06 ` Vincent Guittot
2023-12-12 12:40 ` Qais Yousef
2023-12-29 0:25 ` Qais Yousef
2024-01-03 13:41 ` Vincent Guittot
2024-01-04 19:40 ` Qais Yousef
2023-12-18 8:51 ` Dietmar Eggemann
2023-12-17 21:44 ` Qais Yousef
2023-12-08 1:52 ` [PATCH 2/4] sched/uclamp: Remove rq max aggregation Qais Yousef
2023-12-11 0:08 ` Qais Yousef
2023-12-08 1:52 ` [PATCH 3/4] sched/schedutil: Ignore update requests for short running tasks Qais Yousef
2023-12-08 10:42 ` Hongyan Xia
2023-12-10 22:22 ` Qais Yousef
2023-12-11 11:15 ` Hongyan Xia
2023-12-12 12:23 ` Qais Yousef [this message]
2023-12-08 1:52 ` [PATCH 4/4] sched/documentation: Remove reference to max aggregation Qais Yousef
2023-12-18 8:19 ` [PATCH 0/4] sched: cpufreq: Remove uclamp max-aggregation Dietmar Eggemann
2023-12-17 21:23 ` 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=20231212122340.sus7sbfqqkd4dxoh@airbuntu \
--to=qyousef@layalina.io \
--cc=chungkai@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=hongyan.xia2@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=rickyiu@google.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=wvw@google.com \
/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