linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Query] CPUFreq: Why do we need policy->user_policy?
@ 2013-08-26 14:30 Viresh Kumar
  2013-08-26 14:48 ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2013-08-26 14:30 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Lists linaro-kernel, Linux Kernel Mailing List, linux-pm, cpufreq

Hi Rafael,

I am almost done with cleanup of drivers and am back at cpufreq core.. :)
I got to this structure: struct cpufreq_real_policy;

And I am not able to understand what's the need for this structure?
Can you let me know? Before I try to get rid of it :)

--
viresh

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Query] CPUFreq: Why do we need policy->user_policy?
  2013-08-26 14:30 [Query] CPUFreq: Why do we need policy->user_policy? Viresh Kumar
@ 2013-08-26 14:48 ` Rafael J. Wysocki
  2013-08-26 15:23   ` Lan Tianyu
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-08-26 14:48 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Lists linaro-kernel, Linux Kernel Mailing List, linux-pm, cpufreq

On Monday, August 26, 2013 08:00:52 PM Viresh Kumar wrote:
> Hi Rafael,

Hi,

> I am almost done with cleanup of drivers and am back at cpufreq core.. :)
> I got to this structure: struct cpufreq_real_policy;
> 
> And I am not able to understand what's the need for this structure?
> Can you let me know? Before I try to get rid of it :)

Honestly, I don't remember from the top of my head.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Query] CPUFreq: Why do we need policy->user_policy?
  2013-08-26 14:48 ` Rafael J. Wysocki
@ 2013-08-26 15:23   ` Lan Tianyu
  2013-08-27 10:59     ` Viresh Kumar
  0 siblings, 1 reply; 7+ messages in thread
From: Lan Tianyu @ 2013-08-26 15:23 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Viresh Kumar, Lists linaro-kernel, Linux Kernel Mailing List,
	linux-pm, cpufreq

2013/8/26 Rafael J. Wysocki <rjw@sisk.pl>:
> On Monday, August 26, 2013 08:00:52 PM Viresh Kumar wrote:
>> Hi Rafael,
>
> Hi,
>
>> I am almost done with cleanup of drivers and am back at cpufreq core.. :)
>> I got to this structure: struct cpufreq_real_policy;
>>
>> And I am not able to understand what's the need for this structure?
>> Can you let me know? Before I try to get rid of it :)
>
> Honestly, I don't remember from the top of my head.

So far as I know, it stores some user's config and cpufreq_update_policy()
bases on the data in the struct to start a new policy. Cpu thermal driver
(/driver/thermal/cpu_cooling.c)also will its value to update freq policy
when receive a cpufreq policy adjust notification.

>
> Thanks,
> Rafael
>
> --
> To unsubscribe from this list: send the line "unsubscribe cpufreq" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Best regards
Tianyu Lan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Query] CPUFreq: Why do we need policy->user_policy?
  2013-08-26 15:23   ` Lan Tianyu
@ 2013-08-27 10:59     ` Viresh Kumar
  2013-08-27 14:04       ` Lan Tianyu
  0 siblings, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2013-08-27 10:59 UTC (permalink / raw)
  To: Lan Tianyu
  Cc: Rafael J. Wysocki, Lists linaro-kernel,
	Linux Kernel Mailing List, linux-pm, cpufreq

On 26 August 2013 20:53, Lan Tianyu <lantianyu1986@gmail.com> wrote:
> So far as I know, it stores some user's config and cpufreq_update_policy()
> bases on the data in the struct to start a new policy. Cpu thermal driver
> (/driver/thermal/cpu_cooling.c)also will its value to update freq policy
> when receive a cpufreq policy adjust notification.

Yeah, but how are these different from policy->min/max/policy/governor?
Why do we need to replicate this information?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Query] CPUFreq: Why do we need policy->user_policy?
  2013-08-27 10:59     ` Viresh Kumar
@ 2013-08-27 14:04       ` Lan Tianyu
  2013-08-27 21:20         ` Rafael J. Wysocki
  0 siblings, 1 reply; 7+ messages in thread
From: Lan Tianyu @ 2013-08-27 14:04 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Rafael J. Wysocki, Lists linaro-kernel,
	Linux Kernel Mailing List, linux-pm, cpufreq

2013/8/27 Viresh Kumar <viresh.kumar@linaro.org>:
> On 26 August 2013 20:53, Lan Tianyu <lantianyu1986@gmail.com> wrote:
>> So far as I know, it stores some user's config and cpufreq_update_policy()
>> bases on the data in the struct to start a new policy. Cpu thermal driver
>> (/driver/thermal/cpu_cooling.c)also will its value to update freq policy
>> when receive a cpufreq policy adjust notification.
>
> Yeah, but how are these different from policy->min/max/policy/governor?
> Why do we need to replicate this information?

>From my understanding.policy->min/max may be modified by some drivers
but the user_policy only store user space config and should not be changed
by other reason.  :)

-- 
Best regards
Tianyu Lan

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Query] CPUFreq: Why do we need policy->user_policy?
  2013-08-27 14:04       ` Lan Tianyu
@ 2013-08-27 21:20         ` Rafael J. Wysocki
  2013-08-28  5:42           ` Viresh Kumar
  0 siblings, 1 reply; 7+ messages in thread
From: Rafael J. Wysocki @ 2013-08-27 21:20 UTC (permalink / raw)
  To: Lan Tianyu
  Cc: Viresh Kumar, Lists linaro-kernel, Linux Kernel Mailing List,
	linux-pm, cpufreq

On Tuesday, August 27, 2013 10:04:52 PM Lan Tianyu wrote:
> 2013/8/27 Viresh Kumar <viresh.kumar@linaro.org>:
> > On 26 August 2013 20:53, Lan Tianyu <lantianyu1986@gmail.com> wrote:
> >> So far as I know, it stores some user's config and cpufreq_update_policy()
> >> bases on the data in the struct to start a new policy. Cpu thermal driver
> >> (/driver/thermal/cpu_cooling.c)also will its value to update freq policy
> >> when receive a cpufreq policy adjust notification.
> >
> > Yeah, but how are these different from policy->min/max/policy/governor?
> > Why do we need to replicate this information?
> 
> From my understanding.policy->min/max may be modified by some drivers
> but the user_policy only store user space config and should not be changed
> by other reason.  :)

Yes, that was the original idea IIRC, so separate user settings from stuff that
may be changed internally by the kernel.

Thanks,
Rafael


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Query] CPUFreq: Why do we need policy->user_policy?
  2013-08-27 21:20         ` Rafael J. Wysocki
@ 2013-08-28  5:42           ` Viresh Kumar
  0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2013-08-28  5:42 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Lan Tianyu, Lists linaro-kernel, Linux Kernel Mailing List,
	linux-pm, cpufreq

On 28 August 2013 02:50, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> On Tuesday, August 27, 2013 10:04:52 PM Lan Tianyu wrote:

>> From my understanding.policy->min/max may be modified by some drivers
>> but the user_policy only store user space config and should not be changed
>> by other reason.  :)
>
> Yes, that was the original idea IIRC, so separate user settings from stuff that
> may be changed internally by the kernel.

Yeah, that's what I understood too now.. Anyway I am going to do some core
cleanups now, drivers are mostly done and will see if something can be done
to get rid of them... Otherwise will keep them as is.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2013-08-28  5:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-26 14:30 [Query] CPUFreq: Why do we need policy->user_policy? Viresh Kumar
2013-08-26 14:48 ` Rafael J. Wysocki
2013-08-26 15:23   ` Lan Tianyu
2013-08-27 10:59     ` Viresh Kumar
2013-08-27 14:04       ` Lan Tianyu
2013-08-27 21:20         ` Rafael J. Wysocki
2013-08-28  5:42           ` Viresh Kumar

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).