Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-04 Thread Rafael J. Wysocki
On Fri, Feb 5, 2016 at 4:02 AM, Viresh Kumar wrote: > On 04-02-16, 17:52, Rafael J. Wysocki wrote: >> On Thu, Feb 4, 2016 at 6:36 AM, Viresh Kumar wrote: > >> > Consider a two policy system, who is stopping us from setting ondemand >> > for one of them and conservative for the other one ? And so,

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-04 Thread Viresh Kumar
On 04-02-16, 17:52, Rafael J. Wysocki wrote: > On Thu, Feb 4, 2016 at 6:36 AM, Viresh Kumar wrote: > > Consider a two policy system, who is stopping us from setting ondemand > > for one of them and conservative for the other one ? And so, we will > > have two gdbs_data .. > > I don't really rega

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-04 Thread Rafael J. Wysocki
On Thu, Feb 4, 2016 at 6:36 AM, Viresh Kumar wrote: > On 04-02-16, 00:22, Rafael J. Wysocki wrote: >> From: Rafael J. Wysocki >> >> If the ondemand and conservative governors cannot use per-policy >> tunables (CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not set in the cpufreq >> driver), all policy objec

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-04 Thread Viresh Kumar
On 04-02-16, 17:01, Gautham R Shenoy wrote: > Yes it does! Thank you for the explanation. > > So, the CPUFREQ_HAVE_GOVERNOR_PER_POLICY is really > CPUFREQ_HAVE_GOVERNOR_TUNERS_PER_POLICY. Can we change the name to > reflect the intent? Hmm, we might wanna do that. Though we are quite busy (screwe

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-04 Thread Gautham R Shenoy
Hello Viresh, On Thu, Feb 04, 2016 at 01:55:38PM +0530, Viresh Kumar wrote: > On 04-02-16, 13:44, Gautham R Shenoy wrote: > > In a a two policy system, to run ondemand on one and conservative on the > > other, > >  won't the driver have CPUFREQ_HAVE_GOVERNOR_PER_POLICY set?   > > No. > > CPUFRE

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-04 Thread Viresh Kumar
On 04-02-16, 13:44, Gautham R Shenoy wrote: > In a a two policy system, to run ondemand on one and conservative on the > other, >  won't the driver have CPUFREQ_HAVE_GOVERNOR_PER_POLICY set?   No. CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not about the facility of using separate governor-type for each

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-03 Thread Viresh Kumar
On 04-02-16, 02:25, Rafael J. Wysocki wrote: > You are talking about something like this now: > > if (condition) > goto label; > > return 0; > > label: > do stuff > > I'm sorry, but I fail to see how this is easier to read than > > if (!condition) > return 0; >

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-03 Thread Viresh Kumar
On 04-02-16, 00:22, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > If the ondemand and conservative governors cannot use per-policy > tunables (CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not set in the cpufreq > driver), all policy objects point to the same single dbs_data object. > Additionally

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-03 Thread Saravana Kannan
On 02/03/2016 05:11 PM, Saravana Kannan wrote: On 02/03/2016 03:22 PM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki If the ondemand and conservative governors cannot use per-policy tunables (CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not set in the cpufreq driver), all policy objects point to the

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-03 Thread Saravana Kannan
On 02/03/2016 05:25 PM, Rafael J. Wysocki wrote: On Thu, Feb 4, 2016 at 2:11 AM, Saravana Kannan wrote: On 02/03/2016 03:22 PM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki If the ondemand and conservative governors cannot use per-policy tunables (CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-03 Thread Rafael J. Wysocki
On Thu, Feb 4, 2016 at 2:11 AM, Saravana Kannan wrote: > On 02/03/2016 03:22 PM, Rafael J. Wysocki wrote: >> >> From: Rafael J. Wysocki >> >> If the ondemand and conservative governors cannot use per-policy >> tunables (CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not set in the cpufreq >> driver), all po

Re: [PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-03 Thread Saravana Kannan
On 02/03/2016 03:22 PM, Rafael J. Wysocki wrote: From: Rafael J. Wysocki If the ondemand and conservative governors cannot use per-policy tunables (CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not set in the cpufreq driver), all policy objects point to the same single dbs_data object. Additionally, that

[PATCH 3/11] cpufreq: governor: Use common global_dbs_data pointer

2016-02-03 Thread Rafael J. Wysocki
From: Rafael J. Wysocki If the ondemand and conservative governors cannot use per-policy tunables (CPUFREQ_HAVE_GOVERNOR_PER_POLICY is not set in the cpufreq driver), all policy objects point to the same single dbs_data object. Additionally, that object is pointed to by a global pointer hidden in