mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lukasz Luba <lukasz.luba@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Vincent Wang <bhuwz@163.com>,
	Vincent Wang <vincentwang3@lenovo.com>
Cc: rafael@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] cpufreq: Register with perf domain before
Date: Wed, 18 Jan 2023 09:24:02 +0000	[thread overview]
Message-ID: <529d967f-9dbc-5b35-546a-428cbb191f0f@arm.com> (raw)
In-Reply-To: <20230118084923.m3ztfn6v3hskpad6@vireshk-i7>

Hi Viresh, Vincent

I'm surprised seeing this thread and thanks that you Viresh have
answered, so it could go through my spam/junk filters.
(I hope when answer to that domain it would change something).

On 1/18/23 08:49, Viresh Kumar wrote:
> On 18-01-23, 12:47, Vincent Wang wrote:
>> From: Vincent Wang <vincentwang3@lenovo.com>
>>
>> We found the following issue during kernel boot on android phone:
>>
>> [    1.325272][    T1] cpu cpu0: EM: created perf domain
>> [    1.329317][    T1] cpu cpu4: EM: created perf domain
>> [    1.337597][   T76] pd_init: no EM found for CPU7
>> [    1.350849][    T1] cpu cpu7: EM: created perf domain
>>
>> pd init for cluster2 is executed in a kworker thread and
>> is earlier than the perf domain creation for cluster2.
> 
> Can you please give detail of the exact code path, for mainline kernel
> ? I am not sure which kworker thread are you talking about here.

Please also tell us your cpufreq governor. The schedutil governor
at mainline can handle those situations and we rebuild the perf domains
here [1].

> 
>> pd_init() is called from the cpufreq notification of
>> CPUFREQ_CREATE_POLICY in cpufreq_online(), which is earlier
>> than that cpufreq_driver->register_em() is called.

Viresh, If that's an issue for other governors, than maybe
we should address that. IMO the patch just relies on side-effect
in arch_topology.c update_topology_flags_workfn(). That would be
a workaround and dangerous if someone would change that arch_topology.c
design. Shouldn't we come up with something reliable inside the
cpufreq.c if there is a real issue?
Even now, these two mechanisms:
1. in the schedutil [1]
2. in the update_topology_flags_workfn()
are a bit leaky (in terms of design holes).

Regards,
Lukasz

[1] 
https://elixir.bootlin.com/linux/latest/source/kernel/sched/cpufreq_schedutil.c#L858


  reply	other threads:[~2023-01-18 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-18  4:47 Vincent Wang
2023-01-18  8:49 ` Viresh Kumar
2023-01-18  9:24   ` Lukasz Luba [this message]
2023-01-18 10:00     ` Vincent Wang3
2023-01-18 11:55       ` Lukasz Luba
2023-01-19  5:39     ` Viresh Kumar
2023-01-19  7:58       ` Lukasz Luba
2023-01-19  8:32         ` Viresh Kumar

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=529d967f-9dbc-5b35-546a-428cbb191f0f@arm.com \
    --to=lukasz.luba@arm.com \
    --cc=bhuwz@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=vincentwang3@lenovo.com \
    --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

all inboxes | Powered by JetHome®