diff mbox

[0/4] CPUFreq: Implement per policy instances of governors

Message ID CAKohpokFCAqdoeBoMJ3Jzh05x8wUg4kfo+XirxUjw=2_4_0wJA@mail.gmail.com (mailing list archive)
State RFC, archived
Headers show

Commit Message

Viresh Kumar Feb. 6, 2013, 9:58 a.m. UTC
On 5 February 2013 21:51, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> commit 15b5548c9ccfb8088270f7574710d9d67edfe33b
> Author: Viresh Kumar <viresh.kumar@linaro.org>
> Date:   Tue Feb 5 21:29:05 2013 +0530
>
>     cpufreq: Make governors directory sysfs location based on
> have_multiple_policies
>
>     Until now directory for governors tunables was getting created in
>     cpu/cpufreq/<gov-name>. With the introduction of following patch:
>     "cpufreq: governor: Implement per policy instances of governors"
>
>     this directory would be created in
> cpu/cpu<num>/cpufreq/<gov-name>. This might
>     break userspace of existing platforms. Lets do this change only
> for platforms
>     which need support for multiple policies and thus above mentioned patch.
>
>     From now on, such platforms would be require to do following from
> their init()
>     routines:
>
>         policy->have_multiple_policies = true;
>
>     Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/cpufreq/cpufreq_governor.c |  2 +-
>  include/linux/cpufreq.h            | 14 ++++++++++++++
>  2 files changed, 15 insertions(+), 1 deletion(-)

Hi Rafael,

Because this patch was quite big (317 insertions(+), 238 deletions(-)), i was
planning a detailed self review to capture any mistakes and luckily i found
one for above patch :)


I have pushed the complete patchset here:

http://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/heads/cpufreq-updates
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Amit Kucheria Feb. 6, 2013, 10:08 a.m. UTC | #1
On Wed, Feb 6, 2013 at 3:28 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 5 February 2013 21:51, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> commit 15b5548c9ccfb8088270f7574710d9d67edfe33b
>> Author: Viresh Kumar <viresh.kumar@linaro.org>
>> Date:   Tue Feb 5 21:29:05 2013 +0530
>>
>>     cpufreq: Make governors directory sysfs location based on
>> have_multiple_policies
>>
>>     Until now directory for governors tunables was getting created in
>>     cpu/cpufreq/<gov-name>. With the introduction of following patch:
>>     "cpufreq: governor: Implement per policy instances of governors"
>>
>>     this directory would be created in
>> cpu/cpu<num>/cpufreq/<gov-name>. This might
>>     break userspace of existing platforms. Lets do this change only
>> for platforms
>>     which need support for multiple policies and thus above mentioned patch.
>>
>>     From now on, such platforms would be require to do following from
>> their init()
>>     routines:
>>
>>         policy->have_multiple_policies = true;
>>
>>     Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
>> ---
>>  drivers/cpufreq/cpufreq_governor.c |  2 +-
>>  include/linux/cpufreq.h            | 14 ++++++++++++++
>>  2 files changed, 15 insertions(+), 1 deletion(-)
>
> Hi Rafael,
>
> Because this patch was quite big (317 insertions(+), 238 deletions(-)), i was
> planning a detailed self review to capture any mistakes and luckily i found
> one for above patch :)
>
> diff --git a/drivers/cpufreq/cpufreq_governor.c
> b/drivers/cpufreq/cpufreq_governor.c
> index 41ee86f..fe037c0 100644
> --- a/drivers/cpufreq/cpufreq_governor.c
> +++ b/drivers/cpufreq/cpufreq_governor.c
> @@ -342,7 +342,8 @@ int cpufreq_governor_dbs(struct cpufreq_policy *policy,
>                 mutex_lock(&dbs_data->mutex);
>                 mutex_destroy(&cpu_cdbs->timer_mutex);
>
> -               sysfs_remove_group(&policy->kobj, dbs_data->cdata->attr_group);
> +               sysfs_remove_group(get_governor_parent_kobj(policy),
> +                               dbs_data->cdata->attr_group);
>                 if (dbs_data->cdata->governor == GOV_CONSERVATIVE)
>                         cpufreq_unregister_notifier(cs_ops->notifier_block,
>                                         CPUFREQ_TRANSITION_NOTIFIER);
>
> I have pushed the complete patchset here:
>
> http://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/heads/cpufreq-updates
>

Viresh, perhaps you should ask Stephen Rothwell to pull in your tree
to get some more testing before Rafael pulls it in for 3.10?
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Viresh Kumar Feb. 6, 2013, 10:15 a.m. UTC | #2
On 6 February 2013 15:38, Amit Kucheria <amit.kucheria@linaro.org> wrote:
> On Wed, Feb 6, 2013 at 3:28 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
>> I have pushed the complete patchset here:
>>
>> http://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/heads/cpufreq-updates
>>
>
> Viresh, perhaps you should ask Stephen Rothwell to pull in your tree
> to get some more testing before Rafael pulls it in for 3.10?

Its has been made clear by Rafael that these patches wouldn't make it for
3.9 (though i wanted them to :) ), and so once the merge window is over
Rafael might pull them in and so they would reach Stephen's linux-next too...

I am not sure if sending a cpufreq pull request directly to Stephen is
preferred.
@Rafael: ??
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Rafael Wysocki Feb. 6, 2013, 10:38 a.m. UTC | #3
On Wednesday, February 06, 2013 03:45:58 PM Viresh Kumar wrote:
> On 6 February 2013 15:38, Amit Kucheria <amit.kucheria@linaro.org> wrote:
> > On Wed, Feb 6, 2013 at 3:28 PM, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> >> I have pushed the complete patchset here:
> >>
> >> http://git.linaro.org/gitweb?p=people/vireshk/linux.git;a=shortlog;h=refs/heads/cpufreq-updates
> >>
> >
> > Viresh, perhaps you should ask Stephen Rothwell to pull in your tree
> > to get some more testing before Rafael pulls it in for 3.10?
> 
> Its has been made clear by Rafael that these patches wouldn't make it for
> 3.9 (though i wanted them to :) ), and so once the merge window is over
> Rafael might pull them in and so they would reach Stephen's linux-next too...
> 
> I am not sure if sending a cpufreq pull request directly to Stephen is
> preferred.
> @Rafael: ??

You may do that, if you want, but that's slightly confusing.

Also the policy is that material which is not going to be included into v3.9
shouldn't be in linux-next before v3.9-rc1.

Moreover, for build testing it is sufficient to put it into a branch somewhere
at git.kernel.org (as you have already noticed :-)).

Thanks,
Rafael
diff mbox

Patch

diff --git a/drivers/cpufreq/cpufreq_governor.c
b/drivers/cpufreq/cpufreq_governor.c
index 41ee86f..fe037c0 100644
--- a/drivers/cpufreq/cpufreq_governor.c
+++ b/drivers/cpufreq/cpufreq_governor.c
@@ -342,7 +342,8 @@  int cpufreq_governor_dbs(struct cpufreq_policy *policy,
                mutex_lock(&dbs_data->mutex);
                mutex_destroy(&cpu_cdbs->timer_mutex);

-               sysfs_remove_group(&policy->kobj, dbs_data->cdata->attr_group);
+               sysfs_remove_group(get_governor_parent_kobj(policy),
+                               dbs_data->cdata->attr_group);
                if (dbs_data->cdata->governor == GOV_CONSERVATIVE)
                        cpufreq_unregister_notifier(cs_ops->notifier_block,
                                        CPUFREQ_TRANSITION_NOTIFIER);