From: Saravana Kannan <skannan@codeaurora.org>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/5] cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask
Date: Tue, 13 Oct 2015 12:22:43 -0700 [thread overview]
Message-ID: <561D5A03.3010204@codeaurora.org> (raw)
In-Reply-To: <20151013032301.GL5386@linux>
On 10/12/2015 08:23 PM, Viresh Kumar wrote:
> On 12-10-15, 12:12, Saravana Kannan wrote:
>>> if (new_policy) {
>>> /* related_cpus should at least include policy->cpus. */
>>> - cpumask_or(policy->related_cpus, policy->related_cpus, policy->cpus);
>>> + cpumask_copy(policy->related_cpus, policy->cpus);
>>
>> Again, why? It actually seems wrong. A 4 core cluster could come up
>> with just 2 cores when the policy is added. But the related CPUs
>> would be 4 CPUs.
>
> Firstly, the patch hasn't changed anything at all. related_cpus was
> empty until this point, and orring or setting it with ->cpus will
> result in the same output.
I was under the impression that the CPUfreq drivers were expected to
fill in related_cpus and the or-ing was a safety net. If that's not the
case, then this change is fine.
> Secondly, this is what we always wanted. related_cpus should contain
> the mask of all possible CPUs for that cluster.
I think the confusion was that I thought the drivers are supposed to do
this. If this doesn't mess up other CPUfreq drivers that I'm not
familiar with, then I don't have concerns.
Can you still explain the why in the commit text though? If it's just
that related_cpus is always empty and copying is more efficient than
or-ing, then mention that?
Thanks,
Saravana
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2015-10-13 19:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-11 17:21 [PATCH 0/5] cpufreq: sysfs cleanup Viresh Kumar
2015-10-11 17:21 ` [PATCH 1/5] cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask Viresh Kumar
2015-10-12 19:12 ` Saravana Kannan
2015-10-13 3:23 ` Viresh Kumar
2015-10-13 19:22 ` Saravana Kannan [this message]
2015-10-11 17:21 ` [PATCH 2/5] cpufreq: create cpu/cpufreq at boot time Viresh Kumar
2015-10-11 17:21 ` [PATCH 3/5] cpufreq: remove cpufreq_sysfs_{create|remove}_file() Viresh Kumar
2015-10-11 17:21 ` [PATCH 4/5] cpufreq: create cpu/cpufreq/policyX directories Viresh Kumar
2015-10-12 19:31 ` Saravana Kannan
2015-10-13 3:39 ` Viresh Kumar
2015-10-13 19:29 ` Saravana Kannan
2015-10-15 6:55 ` Viresh Kumar
2015-10-15 19:28 ` Saravana Kannan
2015-10-13 6:15 ` Viresh Kumar
2015-10-13 19:25 ` Saravana Kannan
2015-10-11 17:21 ` [PATCH 5/5] cpufreq: Drop redundant check for inactive policies Viresh Kumar
2015-10-12 19:35 ` Saravana Kannan
2015-10-13 6:05 ` Viresh Kumar
2015-10-11 19:57 ` [PATCH 0/5] cpufreq: sysfs cleanup Doug Smythies
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=561D5A03.3010204@codeaurora.org \
--to=skannan@codeaurora.org \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--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;
as well as URLs for NNTP newsgroup(s).