From: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Qais Yousef <qyousef@layalina.io>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>,
Lukasz Luba <lukasz.luba@arm.com>
Subject: Re: [PATCH 1/4] sched: cpufreq: Rename map_util_perf to apply_dvfs_headroom
Date: Mon, 21 Aug 2023 18:38:25 +0200 [thread overview]
Message-ID: <bc9cd8a3-6bad-3f40-735f-f54b7f3b46b9@arm.com> (raw)
In-Reply-To: <20230820210640.585311-2-qyousef@layalina.io>
On 20/08/2023 23:06, Qais Yousef wrote:
> We are providing headroom for the utilization to grow until the next
> decision point to pick the next frequency. Give the function a better
> name and give it some documentation. It is not really mapping anything.
Wasn't the original aim to have a counterpart to task scheduler's
fits_capacity(), i.e. implement a frequency tipping point at 80%?
#define fits_capacity(cap, max) ((cap) * 1280 < (max) * 1024)
(util / max) = 0.8, hence 1.25 for the frequency-invariant case?
https://lkml.kernel.org/r/11678919.CQLTrQTYxG@vostro.rjw.lan
next_freq = 1.25 * max_freq * util / max
1,25 * util <-- map_util_perf()
[...]
Difference is that EAS deals with `util_cfs` and `capacity` whereas
power (CPUfreq and EM) deals with `util` and `capacity_orig`. And this
is where `capacity pressure` comes in for EAS (or fair.c).
In this regard, I'm not sure why we should rename the function?
> + * This function provides enough headroom to provide adequate performance
> + * assuming the CPU continues to be busy.
> + *
> + * At the moment it is a constant multiplication with 1.25.
> + *
> + * TODO: The headroom should be a function of the delay. 25% is too high
> + * especially on powerful systems. For example, if the delay is 500us, it makes
> + * more sense to give a small headroom as the next decision point is not far
> + * away and will follow the util if it continues to rise. On the other hand if
> + * the delay is 10ms, then we need a bigger headroom so the CPU won't struggle
> + * at a lower frequency if it never goes to idle until then.
I wouldn't add this here since this implementation is not provided.
[...]
next prev parent reply other threads:[~2023-08-21 16:38 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-20 21:06 [PATCH 0/4] Fix dvfs_headroom escaping uclamp constraints Qais Yousef
2023-08-20 21:06 ` [PATCH 1/4] sched: cpufreq: Rename map_util_perf to apply_dvfs_headroom Qais Yousef
2023-08-20 21:13 ` Qais Yousef
2023-08-21 16:38 ` Dietmar Eggemann [this message]
2023-08-26 20:03 ` Qais Yousef
2023-08-20 21:06 ` [PATCH 2/4] sched: cpufreq: Fix apply_dvfs_headroom() escaping uclamp constraints Qais Yousef
2023-08-21 16:39 ` Dietmar Eggemann
2023-08-26 20:08 ` Qais Yousef
2023-09-12 14:34 ` Dietmar Eggemann
2023-09-16 20:30 ` Qais Yousef
2023-08-29 14:35 ` Vincent Guittot
2023-08-29 16:37 ` Qais Yousef
2023-09-07 13:47 ` Vincent Guittot
2023-09-07 21:55 ` Qais Yousef
2023-09-08 14:30 ` Vincent Guittot
2023-09-10 17:46 ` Qais Yousef
2023-09-12 13:40 ` Dietmar Eggemann
2023-09-16 19:25 ` Qais Yousef
2023-09-12 16:03 ` Vincent Guittot
2023-09-16 19:25 ` Qais Yousef
2023-09-24 7:58 ` Vincent Guittot
2023-09-24 17:23 ` Qais Yousef
2023-09-28 17:50 ` Vincent Guittot
2023-09-28 22:05 ` Qais Yousef
2023-09-29 8:01 ` Vincent Guittot
2023-08-20 21:06 ` [PATCH 3/4] sched: cpufreq: Move apply_dvfs_headroom() to sched.h Qais Yousef
2023-08-21 16:40 ` Dietmar Eggemann
2023-08-20 21:06 ` [PATCH RFC 4/4] sched: cpufreq: Apply DVFS headroom to CFS only Qais Yousef
2023-08-21 16:41 ` Dietmar Eggemann
2023-08-26 20:27 ` Qais Yousef
2023-08-21 10:34 ` [PATCH 0/4] Fix dvfs_headroom escaping uclamp constraints Rafael J. Wysocki
2023-08-26 19: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=bc9cd8a3-6bad-3f40-735f-f54b7f3b46b9@arm.com \
--to=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=qyousef@layalina.io \
--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