linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Beata Michalska <beata.michalska@arm.com>
To: Lifeng Zheng <zhenglifeng1@huawei.com>
Cc: catalin.marinas@arm.com, will@kernel.org, rafael@kernel.org,
	viresh.kumar@linaro.org, sudeep.holla@arm.com,
	gregkh@linuxfoundation.org, dakr@kernel.org,
	ionela.voinescu@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-pm@vger.kernel.org, linuxarm@huawei.com,
	jonathan.cameron@huawei.com, vincent.guittot@linaro.org,
	zhanjie9@hisilicon.com, lihuisong@huawei.com,
	yubowen8@huawei.com, zhangpengjie2@huawei.com,
	wangzhi12@huawei.com, linhongye@h-partners.com
Subject: Re: [PATCH v6 0/3] arm64: topology: Handle AMU FIE setup on CPU hotplug
Date: Mon, 1 Dec 2025 16:27:12 +0100	[thread overview]
Message-ID: <aS2z0EURwHbbGZab@arm.com> (raw)
In-Reply-To: <20251119081356.2495290-1-zhenglifeng1@huawei.com>

Hi,

Apologies for the delay in reviewing this - currently in progress....
Out of curiosity: what's the cpufreq driver used for testing this series ?

---
BR
Beata
On Wed, Nov 19, 2025 at 04:13:53PM +0800, Lifeng Zheng wrote:
> Solve a problem that causes CPUs Setup AMU FIE failed in a corner case,
> even though they're eligible.
> 
> Changelog:
> 
> v6:
> 
>  - discard the modifications in cpufreq.c, and instead, make
>    supports_scale_freq_counters() checks that at least one CPU in the
>    policy supports AMU FIE, instead of all
>  - based on Beata's feedback, optimize cpuhp_topology_online() to make it
>    more readable
>  - use pr_warn instead of WARN_ON to show warning message when the
>    freq_counters_valid() check fails in cpuhp_topology_online()
>  - modify commit message as Beata and Rafael suggested
> 
> v5:
> 
>  - add a default implementation for cpufreq_cpu_policy() when
>    CONFIG_CPU_FREQ is not defined
> 
> v4:
> 
>  - change the function's name in patch 2 from
>    'cpufreq_cpu_get_raw_no_check' to 'cpufreq_cpu_policy'
>  - use only one line in the function body of cpufreq_cpu_policy()
>  - use cpus mask instead of related_cpus when calling arch_set_freq_scale()
>    in cpufreq.c
>  - add a warning when the freq_counters_valid() check fails in
>    cpuhp_topology_online()
> 
> v3:
> 
>  - add a patch to optimize amu_fie_setup()
>  - add a patch to add a function to get cpufreq policy without checking if
>    the CPU is online
>  - discard the reuse of amu_fie_setup() in cpuhp_topology_online() and keep
>    all the new logic in cpuhp_topology_online()
>  - test only the CPU which is going online in cpuhp_topology_online()
>  - when the freq_counters_valid() check fails, not only clear the scale
>    freq source but also clear all the related CPUs from amu_fie_cpus mask
>  - add some comments
> 
> v2:
> 
>  - keep init_amu_fie_notifier for setting up AMU FIE when the cpufreq
>    policy is being created
>  - set up AMU FIE only for online CPUs instead of related_cpus in
>    init_amu_fie_callback()
>  - check and set all the online CPUs in the same policy when hotplug one
>  - clear scale freq source for all the online CPUs in the same policy to
>    avoid using different source of the freq scale
> 
> ---
> Discussions of previous version:
> v1: https://lore.kernel.org/all/20250607094533.416368-1-zhenglifeng1@huawei.com/
> v2: https://lore.kernel.org/all/20250725102813.1404322-1-zhenglifeng1@huawei.com/
> v3: https://lore.kernel.org/all/20250805093330.3715444-1-zhenglifeng1@huawei.com/
> v4: https://lore.kernel.org/all/20250814072853.3426386-1-zhenglifeng1@huawei.com/
> v5: https://lore.kernel.org/all/20250819072931.1647431-1-zhenglifeng1@huawei.com/
> 
> Lifeng Zheng (3):
>   arm64: topology: Skip already covered CPUs when setting freq source
>   cpufreq: Add new helper function returning cpufreq policy
>   arm64: topology: Handle AMU FIE setup on CPU hotplug
> 
>  arch/arm64/kernel/topology.c | 67 ++++++++++++++++++++++++++++++++++--
>  drivers/base/arch_topology.c |  9 ++++-
>  drivers/cpufreq/cpufreq.c    |  6 ++++
>  include/linux/cpufreq.h      |  5 +++
>  4 files changed, 83 insertions(+), 4 deletions(-)
> 
> -- 
> 2.33.0
> 

  parent reply	other threads:[~2025-12-01 15:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-19  8:13 [PATCH v6 0/3] arm64: topology: Handle AMU FIE setup on CPU hotplug Lifeng Zheng
2025-11-19  8:13 ` [PATCH v6 1/3] arm64: topology: Skip already covered CPUs when setting freq source Lifeng Zheng
2025-11-19  8:13 ` [PATCH v6 2/3] cpufreq: Add new helper function returning cpufreq policy Lifeng Zheng
2025-11-19  8:13 ` [PATCH v6 3/3] arm64: topology: Handle AMU FIE setup on CPU hotplug Lifeng Zheng
2025-11-25 18:29 ` [PATCH v6 0/3] " Catalin Marinas
2025-11-28 15:49   ` Catalin Marinas
2025-12-01 15:27 ` Beata Michalska [this message]
2025-12-02  3:05   ` zhenglifeng (A)
2025-12-02  3:08     ` zhenglifeng (A)
2025-12-02 15:31     ` Beata Michalska
2025-12-03  9:44       ` zhenglifeng (A)
2025-12-12  9:27       ` zhenglifeng (A)
2025-12-12 20:08         ` Will Deacon
2025-12-20  9:09           ` zhenglifeng (A)
2025-12-29 22:12             ` Beata Michalska

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=aS2z0EURwHbbGZab@arm.com \
    --to=beata.michalska@arm.com \
    --cc=catalin.marinas@arm.com \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=ionela.voinescu@arm.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=linhongye@h-partners.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=rafael@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=wangzhi12@huawei.com \
    --cc=will@kernel.org \
    --cc=yubowen8@huawei.com \
    --cc=zhangpengjie2@huawei.com \
    --cc=zhanjie9@hisilicon.com \
    --cc=zhenglifeng1@huawei.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;
as well as URLs for NNTP newsgroup(s).