Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1629785
| From | Lukasz Luba <lukasz.luba@arm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus' |
| Date | 2017-04-24 19:00 +0200 |
| Message-ID | <tzPvb-118-9@gated-at.bofh.it> (permalink) |
| References | <txQvn-7M4-3@gated-at.bofh.it> <txQvp-7M4-39@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Viresh,
I have been testing the patch set and found one of the issues.
Please see the comment below.
On 19/04/17 06:29, Viresh Kumar wrote:
> 'allowed_cpus' is a copy of policy->related_cpus and can be replaced by
> it directly. At some places we are only concerned about online CPUs and
> policy->cpus can be used there.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
> drivers/thermal/cpu_cooling.c | 77 ++++++++++++-------------------------------
> 1 file changed, 21 insertions(+), 56 deletions(-)
>
> diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c
> index ce387f62c93e..1097162f7f8a 100644
> --- a/drivers/thermal/cpu_cooling.c
> +++ b/drivers/thermal/cpu_cooling.c
> @@ -74,7 +74,6 @@ struct power_table {
> * frequency.
> * @max_level: maximum cooling level. One less than total number of valid
> * cpufreq frequencies.
> - * @allowed_cpus: all the cpus involved for this cpufreq_cooling_device.
> * @node: list_head to link all cpufreq_cooling_device together.
> * @last_load: load measured by the latest call to cpufreq_get_requested_power()
> * @time_in_idle: previous reading of the absolute time that this cpu was idle
> @@ -97,7 +96,6 @@ struct cpufreq_cooling_device {
> unsigned int clipped_freq;
> unsigned int max_level;
> unsigned int *freq_table; /* In descending order */
> - struct cpumask allowed_cpus;
> struct list_head node;
> u32 last_load;
> u64 *time_in_idle;
> @@ -161,7 +159,7 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
>
> mutex_lock(&cooling_list_lock);
> list_for_each_entry(cpufreq_cdev, &cpufreq_cdev_list, node) {
> - if (!cpumask_test_cpu(policy->cpu, &cpufreq_cdev->allowed_cpus))
> + if (policy != cpufreq_cdev->policy)
The policy pointer forwarded from cpufreq_update_policy()
is a local variable 'new_policy' so cannot be compared with pinned
policy pointer in the cooling device.
You should do the cpumask test like before:
if (!cpumask_test_cpu(policy->cpu,
cpufreq_cdev->policy->related_cpus))
But there is something still in the patch set...
I will try to check it tomorrow.
Best regards,
Lukasz
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V3 00/17] thermal: cpu_cooling: improve interaction with cpufreq core Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-19 07:40 +0200
[PATCH V3 01/17] thermal: cpu_cooling: Avoid accessing potentially freed structures Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-19 07:40 +0200
[PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus' Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-19 07:40 +0200
Re: [PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus' Lukasz Luba <lukasz.luba@arm.com> - 2017-04-24 19:00 +0200
Re: [PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus' Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-25 07:00 +0200
Re: [PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus' Lukasz Luba <lukasz.luba@arm.com> - 2017-04-25 12:30 +0200
Re: [PATCH V3 11/17] thermal: cpu_cooling: get rid of 'allowed_cpus' Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-25 12:30 +0200
[PATCH V3 05/17] thermal: cpu_cooling: remove cpufreq_cooling_get_level() Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-19 07:40 +0200
[PATCH V3 15/17] thermal: cpu_cooling: don't store cpu_dev in cpufreq_cdev Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-19 07:40 +0200
csiph-web