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 V2 4/5] cpufreq: create cpu/cpufreq/policyX directories
Date: Thu, 15 Oct 2015 12:25:27 -0700 [thread overview]
Message-ID: <561FFDA7.3080903@codeaurora.org> (raw)
In-Reply-To: <594e7c8e74ca56cef58d29327518f5223e89e208.1444924623.git.viresh.kumar@linaro.org>
On 10/15/2015 09:05 AM, Viresh Kumar wrote:
> The cpufreq sysfs interface had been a bit inconsistent as one of the
> CPUs for a policy had a real directory within its sysfs 'cpuX' directory
> and all other CPUs had links to it. That also made the code a bit
> complex as we need to take care of moving the sysfs directory if the CPU
> containing the real directory is getting physically hot-unplugged.
>
> Solve this by creating 'policyX' directories (per-policy) in
> /sys/devices/system/cpu/cpufreq/ directory, where X is the CPU for which
> the policy was first created.
>
> This also removes the need of keeping kobj_cpu and we can remove it now.
>
> Suggested-by: Saravana Kannan <skannan@codeaurora.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Since you've added a separate patch for making policyX more consistent:
Reviewed-by: Saravana Kannan <skannan@codeaurora.org>
Btw, does a Review-by have an implicit Acked-by?
> ---
> drivers/cpufreq/cpufreq.c | 34 ++++------------------------------
> include/linux/cpufreq.h | 1 -
> 2 files changed, 4 insertions(+), 31 deletions(-)
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index 04222e7bbc73..4fa2215cc6ec 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -910,9 +910,6 @@ static int cpufreq_add_dev_symlink(struct cpufreq_policy *policy)
>
> /* Some related CPUs might not be present (physically hotplugged) */
> for_each_cpu(j, policy->real_cpus) {
> - if (j == policy->kobj_cpu)
> - continue;
> -
> ret = add_cpu_dev_symlink(policy, j);
> if (ret)
> break;
Kinda unrelated to this patch, but shouldn't this function undo the
symlinks is has created so far before returning? Otherwise, we'd be
leaving around broken symlinks.
-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-15 19:25 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 16:05 [PATCH V2 0/5] cpufreq: sysfs cleanup Viresh Kumar
2015-10-15 16:05 ` [PATCH V2 1/5] cpufreq: Use cpumask_copy instead of cpumask_or to copy a mask Viresh Kumar
2015-10-15 16:05 ` Viresh Kumar
2015-10-15 16:05 ` [PATCH V2 2/5] cpufreq: create cpu/cpufreq at boot time Viresh Kumar
2015-10-15 16:05 ` Viresh Kumar
2015-10-15 16:05 ` [PATCH V2 3/5] cpufreq: remove cpufreq_sysfs_{create|remove}_file() Viresh Kumar
2015-10-15 16:05 ` Viresh Kumar
2015-10-15 16:05 ` [PATCH V2 4/5] cpufreq: create cpu/cpufreq/policyX directories Viresh Kumar
2015-10-15 16:05 ` Viresh Kumar
2015-10-15 19:25 ` Saravana Kannan [this message]
2015-10-15 21:35 ` Rafael J. Wysocki
2015-10-16 5:51 ` Viresh Kumar
2015-10-28 8:16 ` Rafael J. Wysocki
2015-10-28 8:28 ` Viresh Kumar
2015-10-15 16:05 ` [PATCH V2 5/5] cpufreq: postfix policy directory with the first CPU in related_cpus Viresh Kumar
2015-10-15 16:05 ` Viresh Kumar
2015-10-15 19:14 ` Saravana Kannan
2015-10-16 7:08 ` Viresh Kumar
2015-10-16 7:11 ` [PATCH V3 " Viresh Kumar
2015-10-16 7:11 ` Viresh Kumar
2015-10-16 19:50 ` Saravana Kannan
2015-10-17 4:29 ` Viresh Kumar
2015-10-22 1:55 ` [PATCH V2 0/5] cpufreq: sysfs cleanup 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=561FFDA7.3080903@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.