From: Qais Yousef <qyousef@layalina.io>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Vincent Guittot <vincent.guittot@linaro.org>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Lukasz Luba <lukasz.luba@arm.com>
Subject: Re: [RFC PATCH 0/7] sched: cpufreq: Remove magic margins
Date: Fri, 8 Sep 2023 15:07:57 +0100 [thread overview]
Message-ID: <20230908140757.haewcuwsumphcv7p@airbuntu> (raw)
In-Reply-To: <44fc6d03-c663-53de-e4f7-e56687c5718d@arm.com>
On 09/08/23 09:40, Dietmar Eggemann wrote:
> On 08/09/2023 02:17, Qais Yousef wrote:
> > On 09/07/23 15:08, Peter Zijlstra wrote:
> >> On Mon, Aug 28, 2023 at 12:31:56AM +0100, Qais Yousef wrote:
>
> [...]
>
> > But for the 0.8 and 1.25 margin problems, actually the problem is that 25% is
> > too aggressive/fast and wastes power. I'm actually slowing things down as
> > a result of this series. And I'm expecting some not to be happy about it on
> > their systems. The response_time_ms was my way to give back control. I didn't
> > see how I can make things faster and slower at the same time without making
> > decisions on behalf of the user/sysadmin.
> >
> > So the connection I see between PELT and the margins or headrooms in
> > fits_capacity() and map_util_perf()/dvfs_headroom is that they expose the need
> > to manage the perf/power trade-off of the system.
> >
> > Particularly the default is not good for the modern systems, Cortex-X is too
> > powerful but we still operate within the same power and thermal budgets.
> >
> > And what was a high end A78 is a mid core today. So if you look at today's
> > mobile world topology we really have a tiy+big+huge combination of cores. The
> > bigs are called mids, but they're very capable. Fits capacity forces migration
> > to the 'huge' cores too soon with that 80% margin. While the 80% might be too
> > small for the tiny ones as some workloads really struggle there if they hang on
> > for too long. It doesn't help that these systems ship with 4ms tick. Something
> > more to consider changing I guess.
>
> If this is the problem then you could simply make the margin (headroom)
> a function of cpu_capacity_orig?
I don't see what you mean. instead of capacity_of() but keep the 80%?
Again, I could be delusional and misunderstanding everything, but what I really
see fits_capacity() is about is misfit detection. But a task is not really
misfit until it actually has a util above the capacity of the CPU. Now due to
implementation details there can be a delay between the task crossing this
capacity and being able to move it. Which what I believe this headroom is
trying to achieve.
I think we can better define this by tying this headroom to the worst case
scenario it takes to actually move this misfit task to the right CPU. If it can
continue to run without being impacted with this delay and crossing the
capacity of the CPU it is on, then we should not trigger misfit IMO.
>
> [...]
>
> > There's a question that I'm struggling with if I may ask. Why is it perceived
> > our constant response time (practically ~200ms to go from 0 to max) as a good
> > fit for all use cases? Capability of systems differs widely in terms of what
> > performance you get at say a util of 512. Or in other words how much work is
> > done in a unit of time differs between system, but we still represent that work
> > in a constant way. A task ran for 10ms on powerful System A would have done
>
> PELT (util_avg) is uarch & frequency invariant.
>
> So e.g. a task with util_avg = 256 could have a runtime/period
>
> on big CPU (capacity = 1024) of 4ms/16ms
>
> on little CPU (capacity = 512) of 8ms/16ms
>
> The amount of work in invariant (so we can compare between asymmetric
> capacity CPUs) but the runtime obviously differs according to the capacity.
Yep!
Cheers
--
Qais Yousef
next prev parent reply other threads:[~2023-09-08 14:08 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-27 23:31 [RFC PATCH 0/7] sched: cpufreq: Remove magic margins Qais Yousef
2023-08-27 23:31 ` [RFC PATCH 1/7] sched/pelt: Add a new function to approximate the future util_avg value Qais Yousef
2023-09-06 12:56 ` Dietmar Eggemann
2023-09-06 21:19 ` Qais Yousef
2023-09-07 11:12 ` Dietmar Eggemann
2023-09-10 19:58 ` Qais Yousef
2023-09-13 17:22 ` Dietmar Eggemann
2023-09-16 19:49 ` Qais Yousef
2023-09-16 19:52 ` Qais Yousef
2023-08-27 23:31 ` [RFC PATCH 2/7] sched/pelt: Add a new function to approximate runtime to reach given util Qais Yousef
2023-09-06 12:56 ` Dietmar Eggemann
2023-09-06 20:44 ` Dietmar Eggemann
2023-09-06 21:38 ` Qais Yousef
2023-09-15 9:15 ` Hongyan Xia
2023-09-16 19:56 ` Qais Yousef
2023-08-27 23:31 ` [RFC PATCH 3/7] sched/fair: Remove magic margin in fits_capacity() Qais Yousef
2023-09-06 14:38 ` Dietmar Eggemann
2023-09-06 21:45 ` Qais Yousef
2023-08-27 23:32 ` [RFC PATCH 4/7] sched: cpufreq: Remove magic 1.25 headroom from apply_dvfs_headroom() Qais Yousef
2023-09-07 11:34 ` Peter Zijlstra
2023-09-10 19:23 ` Qais Yousef
2023-08-27 23:32 ` [RFC PATCH 5/7] sched/schedutil: Add a new tunable to dictate response time Qais Yousef
2023-09-06 21:13 ` Dietmar Eggemann
2023-09-06 21:52 ` Qais Yousef
2023-09-07 11:44 ` Peter Zijlstra
2023-09-10 19:25 ` Qais Yousef
2023-08-27 23:32 ` [RFC PATCH 6/7] sched/pelt: Introduce PELT multiplier Qais Yousef
2023-08-27 23:32 ` [RFC PATCH 7/7] cpufreq: Change default transition delay to 2ms Qais Yousef
2023-09-06 9:18 ` [RFC PATCH 0/7] sched: cpufreq: Remove magic margins Lukasz Luba
2023-09-06 21:18 ` Qais Yousef
2023-09-07 7:48 ` Lukasz Luba
2023-09-07 11:53 ` Peter Zijlstra
2023-09-07 13:06 ` Lukasz Luba
2023-09-07 13:29 ` Peter Zijlstra
2023-09-07 13:33 ` Lukasz Luba
2023-09-07 13:38 ` Peter Zijlstra
2023-09-07 13:45 ` Lukasz Luba
2023-09-08 12:51 ` Daniel Bristot de Oliveira
2023-09-12 11:57 ` Lukasz Luba
2023-09-10 18:20 ` Qais Yousef
2023-09-10 18:14 ` Qais Yousef
2023-09-07 13:26 ` Peter Zijlstra
2023-09-07 13:57 ` Lukasz Luba
2023-09-07 14:29 ` Peter Zijlstra
2023-09-07 14:42 ` Lukasz Luba
2023-09-07 20:16 ` Peter Zijlstra
2023-09-12 11:51 ` Lukasz Luba
2023-09-12 14:01 ` Vincent Guittot
2023-09-13 9:53 ` Lukasz Luba
2023-09-12 14:28 ` Peter Zijlstra
2023-09-10 19:06 ` Qais Yousef
2023-09-10 18:46 ` Qais Yousef
2023-09-07 13:08 ` Peter Zijlstra
2023-09-08 0:17 ` Qais Yousef
2023-09-08 7:40 ` Dietmar Eggemann
2023-09-08 14:07 ` Qais Yousef [this message]
2023-09-12 17:18 ` Dietmar Eggemann
2023-09-16 19:38 ` Qais Yousef
2023-09-08 10:25 ` Peter Zijlstra
2023-09-08 13:33 ` Qais Yousef
2023-09-08 13:58 ` Peter Zijlstra
2023-09-08 13:59 ` Peter Zijlstra
2023-09-08 14:11 ` Qais Yousef
2023-09-10 21:17 ` 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=20230908140757.haewcuwsumphcv7p@airbuntu \
--to=qyousef@layalina.io \
--cc=dietmar.eggemann@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=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