[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <82d272fb-ffc3-4d55-b92a-497cbc13fc03@arm.com>
Date: Thu, 18 Jan 2024 18:36:14 +0100
From: Pierre Gondois <pierre.gondois@....com>
To: Vincent Guittot <vincent.guittot@...aro.org>, mingo@...hat.com,
peterz@...radead.org, juri.lelli@...hat.com, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, vschneid@...hat.com, sudeep.holla@....com,
gregkh@...uxfoundation.org, rafael@...nel.org, linux-kernel@...r.kernel.org
Cc: lukasz.luba@....com, ionela.voinescu@....com
Subject: Re: [Resend PATCH] topology: Set capacity_freq_ref in all cases
Tested-by: Pierre Gondois <pierre.gondois@....com>
On 1/17/24 20:05, Vincent Guittot wrote:
> If "capacity-dmips-mhz" is not set, raw_capacity is null and we skip the
> normalization step which includes setting per_cpu capacity_freq_ref.
> Always register the notifier but skip the capacity normalization if
> raw_capacity is null.
>
> Fixes: 9942cb22ea45 ("sched/topology: Add a new arch_scale_freq_ref() method")
> Signed-off-by: Vincent Guittot <vincent.guittot@...aro.org>
> ---
>
> Resend with correct email address for Sudeep
>
> drivers/base/arch_topology.c | 13 ++++++-------
> 1 file changed, 6 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index 5aaa0865625d..2aa0c6425290 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -417,9 +417,6 @@ init_cpu_capacity_callback(struct notifier_block *nb,
> struct cpufreq_policy *policy = data;
> int cpu;
>
> - if (!raw_capacity)
> - return 0;
> -
> if (val != CPUFREQ_CREATE_POLICY)
> return 0;
>
> @@ -436,9 +433,11 @@ init_cpu_capacity_callback(struct notifier_block *nb,
> }
>
> if (cpumask_empty(cpus_to_visit)) {
> - topology_normalize_cpu_scale();
> - schedule_work(&update_topology_flags_work);
> - free_raw_capacity();
> + if (raw_capacity) {
> + topology_normalize_cpu_scale();
> + schedule_work(&update_topology_flags_work);
> + free_raw_capacity();
> + }
> pr_debug("cpu_capacity: parsing done\n");
> schedule_work(&parsing_done_work);
> }
> @@ -458,7 +457,7 @@ static int __init register_cpufreq_notifier(void)
> * On ACPI-based systems skip registering cpufreq notifier as cpufreq
> * information is not needed for cpu capacity initialization.
> */
> - if (!acpi_disabled || !raw_capacity)
> + if (!acpi_disabled)
> return -EINVAL;
>
> if (!alloc_cpumask_var(&cpus_to_visit, GFP_KERNEL))
Powered by blists - more mailing lists