From: Shawn Guo <shawnguo2@yeah.net>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Qais Yousef <qyousef@layalina.io>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
Shawn Guo <shawnguo@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH] cpufreq: cap the default transition delay at 10 ms
Date: Fri, 12 Sep 2025 21:07:46 +0800 [thread overview]
Message-ID: <aMQbIu5QNvPoAsSF@dragon> (raw)
In-Reply-To: <CAJZ5v0gL5s99h0eq1U4ngaUfPq_AcfgPruSD096JtBWVMjSZwQ@mail.gmail.com>
On Fri, Sep 12, 2025 at 12:41:14PM +0200, Rafael J. Wysocki wrote:
> On Wed, Sep 10, 2025 at 8:53 AM Shawn Guo <shawnguo2@yeah.net> wrote:
> >
> > From: Shawn Guo <shawnguo@kernel.org>
> >
> > A regression is seen with 6.6 -> 6.12 kernel upgrade on platforms where
> > cpufreq-dt driver sets cpuinfo.transition_latency as CPUFREQ_ETERNAL (-1),
> > due to that platform's DT doesn't provide the optional property
> > 'clock-latency-ns'. The dbs sampling_rate was 10000 us on 6.6 and
> > suddently becomes 6442450 us (4294967295 / 1000 * 1.5) on 6.12 for these
> > platforms, because that the 10 ms cap for transition_delay_us was
> > accidentally dropped by the commits below.
>
> IIRC, this was not accidental.
I could be wrong, but my understanding is that the intention of Qais's
commits is to drop 10 ms (and LATENCY_MULTIPLIER) as the *minimal* limit
on transition_delay_us, so that it's possible to get a much less
transition_delay_us on platforms like M1 mac mini where the transition
latency is just tens of us. But it breaks platforms where 10 ms used
to be the *maximum* limit.
Even if it's intentional to remove 10 ms as both the minimal and maximum
limits, breaking some platforms must not be intentional, I guess :)
> Why do you want to address the issue in the cpufreq core instead of
> doing that in the cpufreq-dt driver?
My intuition was to fix the regression at where the regression was
introduced by recovering the code behavior.
> CPUFREQ_ETERNAL doesn't appear to be a reasonable default for
> cpuinfo.transition_latency. Maybe just change the default there to 10
> ms?
I think cpufreq-dt is doing what it's asked to do, no?
/*
* Maximum transition latency is in nanoseconds - if it's unknown,
* CPUFREQ_ETERNAL shall be used.
*/
Also, 10 ms will then be turned into 15 ms by:
/* Give a 50% breathing room between updates */
return latency + (latency >> 1);
Shawn
next prev parent reply other threads:[~2025-09-12 13:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-10 6:53 [PATCH] cpufreq: cap the default transition delay at 10 ms Shawn Guo
2025-09-10 7:11 ` Shawn Guo
2025-09-12 10:41 ` Rafael J. Wysocki
2025-09-12 13:07 ` Shawn Guo [this message]
2025-09-14 17:43 ` Qais Yousef
2025-09-15 7:29 ` Shawn Guo
2025-09-15 10:02 ` Qais Yousef
2025-09-15 12:20 ` Shawn Guo
2025-09-15 13:18 ` Rafael J. Wysocki
2025-09-16 1:52 ` Shawn Guo
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=aMQbIu5QNvPoAsSF@dragon \
--to=shawnguo2@yeah.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=qyousef@layalina.io \
--cc=rafael@kernel.org \
--cc=shawnguo@kernel.org \
--cc=stable@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.