From: "zhidao su (Xiaomi)" <soolaugust@gmail.com>
To: qyousef@layalina.io
Cc: dietmar.eggemann@arm.com, jstultz@google.com,
juri.lelli@redhat.com, linux-kernel@vger.kernel.org,
mingo@kernel.org, peterz@infradead.org, rafael@kernel.org,
rostedt@goodmis.org, tglx@kernel.org, tim.c.chen@linux.intel.com,
vincent.guittot@linaro.org, viresh.kumar@linaro.org,
yu.c.chen@intel.com, zhidao su <soolaugust@gmail.com>
Subject: Re: [PATCH v3 04/10] sched/fair: Remove magic hardcoded margin in fits_capacity()
Date: Thu, 3 Dec 2026 16:28:21 +0800 [thread overview]
Message-ID: <20261203082821.569525-1-soolaugust@gmail.com> (raw)
In-Reply-To: <20261126051429.14091-5-qyousef@layalina.io>
Hi Qais,
On Thu, Nov 26, 2026 at 05:14:23AM +0000, Qais Yousef wrote:
> To calculate this threshold, we use the new approximate_util_avg()
> function to find out the threshold, based on arch_scale_cpu_capacity()
> the task will be misfit if it continues to run for a TICK_USEC which is
> our worst case scenario for when misfit migration will kick in.
Using arch_scale_cpu_capacity() for the threshold is clear. What I don't
follow is what happens to capacity pressure.
> - unsigned long capacity = capacity_of(cpu);
> ...
> - fits = fits_capacity(util, capacity);
> + fits = fits_capacity(util, cpu);
capacity_of() took thermal and rt/dl/irq pressure out of the real-util
comparison. Now a throttled CPU and an idle one report the same
threshold, and a task whose util sits between the two fits where it did
not before.
The comment below still says the opposite:
> /*
> * We must use arch_scale_cpu_capacity() for comparing against uclamp_min and
> * uclamp_max. We only care about capacity pressure (by using
> * capacity_of()) for comparing against the real util.
Pressure is now honoured only on the uclamp_min path, through
get_actual_cpu_capacity().
Was dropping it from the real-util path intentional? If so, the comment
needs to change in this patch too.
Thanks,
Zhidao
next prev parent reply other threads:[~2026-12-03 8:28 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 5:14 [PATCH v3 00/10] Better manage system response time Qais Yousef
2026-11-26 5:14 ` [PATCH v3 01/10] sched: cpufreq: Rename map_util_perf to sugov_apply_dvfs_headroom Qais Yousef
2026-11-26 5:14 ` [PATCH v3 02/10] sched/pelt: Add a new function to approximate the future util_avg value Qais Yousef
2026-11-26 5:14 ` [PATCH v3 03/10] sched/pelt: Add a new function to approximate runtime to reach given util Qais Yousef
2026-11-26 10:50 ` Li kunyu
2026-12-01 0:35 ` Qais Yousef
2026-11-26 5:14 ` [PATCH v3 04/10] sched/fair: Remove magic hardcoded margin in fits_capacity() Qais Yousef
2026-12-03 8:28 ` zhidao su (Xiaomi) [this message]
2026-11-26 5:14 ` [PATCH v3 05/10] sched: cpufreq: Remove magic 1.25 headroom from sugov_apply_dvfs_headroom() Qais Yousef
2026-11-26 5:14 ` [PATCH v3 06/10] sched/fair: Extend util_est to improve rampup time Qais Yousef
2026-11-26 5:14 ` [PATCH v3 07/10] sched/fair: util_est: Take into account periodic tasks Qais Yousef
2026-11-26 5:14 ` [PATCH v3 08/10] sched/debugfs: Add rampup_multiplier to debugfs Qais Yousef
2026-11-26 5:14 ` [PATCH v3 09/10] sched/fair: Disable util_est when rampup_multiplier is 0 Qais Yousef
2026-11-26 5:14 ` [PATCH v3 10/10] sched/fair: Don't mess with util_avg post init 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=20261203082821.569525-1-soolaugust@gmail.com \
--to=soolaugust@gmail.com \
--cc=dietmar.eggemann@arm.com \
--cc=jstultz@google.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=qyousef@layalina.io \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@kernel.org \
--cc=tim.c.chen@linux.intel.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=yu.c.chen@intel.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
all inboxes | Powered by JetHome®