From: Lukasz Luba <lukasz.luba@arm.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Sam Wu <wusamuel@google.com>,
Saravana Kannan <saravanak@google.com>,
Viresh Kumar <viresh.kumar@linaro.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
Valentin Schneider <vschneid@redhat.com>,
"Isaac J . Manjarres" <isaacmanjarres@google.com>,
kernel-team@android.com,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] Revert "cpufreq: schedutil: Move max CPU capacity to sugov_policy"
Date: Wed, 30 Nov 2022 15:00:51 +0000 [thread overview]
Message-ID: <3ad43913-00f2-49cb-ad3a-b0e12347389f@arm.com> (raw)
In-Reply-To: <CAKfTPtA=7DkjADnNijLPDm_6hh9XkFjC9ZUVQ_5_NSU2Fn5pHQ@mail.gmail.com>
On 11/30/22 14:29, Vincent Guittot wrote:
> On Wed, 30 Nov 2022 at 15:04, Lukasz Luba <lukasz.luba@arm.com> wrote:
>>
>> Hi Vincent,
>>
>> On 11/30/22 10:42, Vincent Guittot wrote:
>>> Hi All
>>>
>>> Just for the log and because it took me a while to figure out the root
>>> cause of the problem: This patch also creates a regression for
>>> snapdragon845 based systems and probably on any QC chipsets that use a
>>> LUT to update the OPP table at boot. The behavior is the same as
>>> described by Sam with a staled value in sugov_policy.max field.
>>
>> Thanks for sharing this info and apologies that you spent cycles
>> on it.
>>
>> I have checked that whole setup code (capacity + cpufreq policy and
>> governor). It looks like to have a proper capacity of CPUs, we need
>> to wait till the last policy is created. It's due to the arch_topology.c
>> mechanism which is only triggered after all CPUs' got the policy.
>> Unfortunately, this leads to a chicken & egg situation for this
>> schedutil setup of max capacity.
>>
>> I have experimented with this code, which triggers an update in
>> the schedutil, when all CPUs got the policy and sugov gov
>> (with trace_printk() to mach the output below)
>
> Your proposal below looks similar to what is done in arch_topology.c.
Yes, even the name 'cpus_to_visit' looks similar ;)
> arch_topology.c triggers a rebuild of sched_domain and removes its
> cpufreq notifier cb once it has visited all CPUs, could it also
> trigger an update of CPU's policy with cpufreq_update_policy() ?
>
> At this point you will be sure that the normalization has happened and
> the max capacity will not change.
True, they are done under that blocking notification chain, for the
last policy init. This is before the last time we call the
schedutil sugov_start with that last policy. That's why this code
is able to see that properly normalized max capacity under the:
trace_printk("schedutil the visit cpu mask is empty now\n");
>
> I don't know if it's a global problem or only for systems using arch_topology
>
It would only be for those with arch_topology, so only our asymmetric
systems AFAICS.
next prev parent reply other threads:[~2022-11-30 15:01 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-10 19:57 [PATCH v1] Revert "cpufreq: schedutil: Move max CPU capacity to sugov_policy" Sam Wu
2022-11-15 22:35 ` Saravana Kannan
2022-11-16 11:43 ` Lukasz Luba
2022-11-16 12:17 ` Rafael J. Wysocki
2022-11-18 1:00 ` Sam Wu
2022-11-21 19:18 ` Rafael J. Wysocki
2022-11-22 8:58 ` Lukasz Luba
2022-11-30 10:42 ` Vincent Guittot
2022-11-30 14:04 ` Lukasz Luba
2022-11-30 14:29 ` Vincent Guittot
2022-11-30 15:00 ` Lukasz Luba [this message]
2022-11-16 11:35 ` Lukasz Luba
2022-11-20 18:07 ` [PATCH v1] Revert "cpufreq: schedutil: Move max CPU capacity to sugov_policy" #forregzbot Thorsten Leemhuis
2022-11-27 12:06 ` Thorsten Leemhuis
2022-12-05 9:18 ` [PATCH v1] Revert "cpufreq: schedutil: Move max CPU capacity to sugov_policy" Viresh Kumar
2022-12-06 8:17 ` Lukasz Luba
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=3ad43913-00f2-49cb-ad3a-b0e12347389f@arm.com \
--to=lukasz.luba@arm.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=isaacmanjarres@google.com \
--cc=juri.lelli@redhat.com \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=saravanak@google.com \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=vschneid@redhat.com \
--cc=wusamuel@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