* [PATCH] cpufreq: conservative: Do not use transition notifications
@ 2016-06-10 1:00 Rafael J. Wysocki
2016-06-13 11:08 ` Viresh Kumar
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2016-06-10 1:00 UTC (permalink / raw)
To: Linux PM list
Cc: Viresh Kumar, Linux Kernel Mailing List, Srinivas Pandruvada
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
The conservative governor registers a transition notifier so it
can update its internal requested_freq value if it falls out of the
policy->min...policy->max range, but that's not the most
straightforward way to achieve that.
To do it in a more straightforward way, first make sure that
cs_dbs_timer() will only set frequencies between min and max.
With that, note that requested_freq will always fall between min
and max unless either policy->min or policy->max changes and the
governor's ->limits() callback will be invoked then.
Using this observation, add a ->limits callback pointer to
struct dbs_governor, make cpufreq_dbs_governor_limits() invoke
that callback if present, implement that callback in the conservative
governor to update requested_freq if needed and drop the transition
notifier from it, which also makes it possible to drop the
struct cs_governor definition from there and simplify the code
accordingly.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/cpufreq/cpufreq_conservative.c | 85 +++++++--------------------------
drivers/cpufreq/cpufreq_governor.c | 4 +
drivers/cpufreq/cpufreq_governor.h | 1
3 files changed, 25 insertions(+), 65 deletions(-)
Index: linux-pm/drivers/cpufreq/cpufreq_conservative.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_conservative.c
+++ linux-pm/drivers/cpufreq/cpufreq_conservative.c
@@ -106,7 +106,8 @@ static unsigned int cs_dbs_timer(struct
goto out;
freq_target = get_freq_target(cs_tuners, policy);
- if (dbs_info->requested_freq > freq_target)
+ if (dbs_info->requested_freq > freq_target
+ && dbs_info->requested_freq - freq_target > policy->min)
dbs_info->requested_freq -= freq_target;
else
dbs_info->requested_freq = policy->min;
@@ -119,13 +120,6 @@ static unsigned int cs_dbs_timer(struct
return dbs_data->sampling_rate;
}
-static int dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
- void *data);
-
-static struct notifier_block cs_cpufreq_notifier_block = {
- .notifier_call = dbs_cpufreq_notifier,
-};
-
/************************** sysfs interface ************************/
static ssize_t store_sampling_down_factor(struct gov_attr_set *attr_set,
@@ -254,13 +248,6 @@ static struct attribute *cs_attributes[]
/************************** sysfs end ************************/
-struct cs_governor {
- struct dbs_governor dbs_gov;
- unsigned int usage_count;
-};
-
-static struct cs_governor cs_gov;
-
static struct policy_dbs_info *cs_alloc(void)
{
struct cs_policy_dbs_info *dbs_info;
@@ -294,25 +281,11 @@ static int cs_init(struct dbs_data *dbs_
dbs_data->min_sampling_rate = MIN_SAMPLING_RATE_RATIO *
jiffies_to_usecs(10);
- /*
- * This function and cs_exit() are only called under gov_dbs_data_mutex
- * which is global, so the cs_gov.usage_count accesses are guaranteed
- * to be serialized.
- */
- if (!cs_gov.usage_count++)
- cpufreq_register_notifier(&cs_cpufreq_notifier_block,
- CPUFREQ_TRANSITION_NOTIFIER);
-
return 0;
}
static void cs_exit(struct dbs_data *dbs_data)
{
- /* Protected by gov_dbs_data_mutex - see the comment in cs_init(). */
- if (!--cs_gov.usage_count)
- cpufreq_unregister_notifier(&cs_cpufreq_notifier_block,
- CPUFREQ_TRANSITION_NOTIFIER);
-
kfree(dbs_data->tuners);
}
@@ -324,47 +297,29 @@ static void cs_start(struct cpufreq_poli
dbs_info->requested_freq = policy->cur;
}
-static struct cs_governor cs_gov = {
- .dbs_gov = {
- .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"),
- .kobj_type = { .default_attrs = cs_attributes },
- .gov_dbs_timer = cs_dbs_timer,
- .alloc = cs_alloc,
- .free = cs_free,
- .init = cs_init,
- .exit = cs_exit,
- .start = cs_start,
- },
-};
-
-#define CPU_FREQ_GOV_CONSERVATIVE (&cs_gov.dbs_gov.gov)
-
-static int dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
- void *data)
+static void cs_limits(struct cpufreq_policy *policy)
{
- struct cpufreq_freqs *freq = data;
- struct cpufreq_policy *policy = cpufreq_cpu_get_raw(freq->cpu);
- struct cs_policy_dbs_info *dbs_info;
-
- if (!policy)
- return 0;
-
- /* policy isn't governed by conservative governor */
- if (policy->governor != CPU_FREQ_GOV_CONSERVATIVE)
- return 0;
+ struct cs_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data);
- dbs_info = to_dbs_info(policy->governor_data);
- /*
- * we only care if our internally tracked freq moves outside the 'valid'
- * ranges of frequency available to us otherwise we do not change it
- */
if (dbs_info->requested_freq > policy->max
- || dbs_info->requested_freq < policy->min)
- dbs_info->requested_freq = freq->new;
-
- return 0;
+ || dbs_info->requested_freq < policy->min)
+ dbs_info->requested_freq = policy->cur;
}
+static struct dbs_governor cs_governor = {
+ .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"),
+ .kobj_type = { .default_attrs = cs_attributes },
+ .gov_dbs_timer = cs_dbs_timer,
+ .alloc = cs_alloc,
+ .free = cs_free,
+ .init = cs_init,
+ .exit = cs_exit,
+ .start = cs_start,
+ .limits = cs_limits,
+};
+
+#define CPU_FREQ_GOV_CONSERVATIVE (&cs_governor.gov)
+
static int __init cpufreq_gov_dbs_init(void)
{
return cpufreq_register_governor(CPU_FREQ_GOV_CONSERVATIVE);
Index: linux-pm/drivers/cpufreq/cpufreq_governor.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_governor.c
+++ linux-pm/drivers/cpufreq/cpufreq_governor.c
@@ -545,6 +545,7 @@ EXPORT_SYMBOL_GPL(cpufreq_dbs_governor_s
void cpufreq_dbs_governor_limits(struct cpufreq_policy *policy)
{
+ struct dbs_governor *gov = dbs_governor_of(policy);
struct policy_dbs_info *policy_dbs = policy->governor_data;
mutex_lock(&policy_dbs->timer_mutex);
@@ -554,6 +555,9 @@ void cpufreq_dbs_governor_limits(struct
else if (policy->min > policy->cur)
__cpufreq_driver_target(policy, policy->min, CPUFREQ_RELATION_L);
+ if (gov->limits)
+ gov->limits(policy);
+
gov_update_sample_delay(policy_dbs, 0);
mutex_unlock(&policy_dbs->timer_mutex);
Index: linux-pm/drivers/cpufreq/cpufreq_governor.h
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq_governor.h
+++ linux-pm/drivers/cpufreq/cpufreq_governor.h
@@ -141,6 +141,7 @@ struct dbs_governor {
int (*init)(struct dbs_data *dbs_data);
void (*exit)(struct dbs_data *dbs_data);
void (*start)(struct cpufreq_policy *policy);
+ void (*limits)(struct cpufreq_policy *policy);
};
static inline struct dbs_governor *dbs_governor_of(struct cpufreq_policy *policy)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] cpufreq: conservative: Do not use transition notifications 2016-06-10 1:00 [PATCH] cpufreq: conservative: Do not use transition notifications Rafael J. Wysocki @ 2016-06-13 11:08 ` Viresh Kumar 2016-06-13 13:36 ` Rafael J. Wysocki 0 siblings, 1 reply; 5+ messages in thread From: Viresh Kumar @ 2016-06-13 11:08 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Linux PM list, Linux Kernel Mailing List, Srinivas Pandruvada On 10-06-16, 03:00, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > The conservative governor registers a transition notifier so it > can update its internal requested_freq value if it falls out of the > policy->min...policy->max range, but that's not the most > straightforward way to achieve that. > > To do it in a more straightforward way, first make sure that > cs_dbs_timer() will only set frequencies between min and max. > > With that, note that requested_freq will always fall between min > and max unless either policy->min or policy->max changes and the > governor's ->limits() callback will be invoked then. > > Using this observation, add a ->limits callback pointer to > struct dbs_governor, make cpufreq_dbs_governor_limits() invoke > that callback if present, implement that callback in the conservative > governor to update requested_freq if needed and drop the transition > notifier from it, which also makes it possible to drop the > struct cs_governor definition from there and simplify the code > accordingly. This code looks to me over-complicated and I am not sure if I understand why we wanted the notifiers anyway? Why can't we replace 'dbs_info->requested_freq' with 'policy->cur' and kill the notifier thing completely? With requested_freq, we are trying to set the next freq to requested_freq +- Delta, which I am not sure is the best approach here. What would go wrong if we will do, policy->cur +- delta instead? The notifiers were added long back, to solve a problem which I don't think will exist if we use policy->cur everywhere instead: commit a8d7c3bc2396 ("[CPUFREQ] Make cpufreq_conservative handle out-of-sync events properly") Am I missing something? -- viresh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: conservative: Do not use transition notifications 2016-06-13 11:08 ` Viresh Kumar @ 2016-06-13 13:36 ` Rafael J. Wysocki 2016-06-13 15:28 ` Viresh Kumar 0 siblings, 1 reply; 5+ messages in thread From: Rafael J. Wysocki @ 2016-06-13 13:36 UTC (permalink / raw) To: Viresh Kumar Cc: Linux PM list, Linux Kernel Mailing List, Srinivas Pandruvada On Monday, June 13, 2016 04:38:51 PM Viresh Kumar wrote: > On 10-06-16, 03:00, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > > > The conservative governor registers a transition notifier so it > > can update its internal requested_freq value if it falls out of the > > policy->min...policy->max range, but that's not the most > > straightforward way to achieve that. > > > > To do it in a more straightforward way, first make sure that > > cs_dbs_timer() will only set frequencies between min and max. > > > > With that, note that requested_freq will always fall between min > > and max unless either policy->min or policy->max changes and the > > governor's ->limits() callback will be invoked then. > > > > Using this observation, add a ->limits callback pointer to > > struct dbs_governor, make cpufreq_dbs_governor_limits() invoke > > that callback if present, implement that callback in the conservative > > governor to update requested_freq if needed and drop the transition > > notifier from it, which also makes it possible to drop the > > struct cs_governor definition from there and simplify the code > > accordingly. > > This code looks to me over-complicated and I am not sure if I > understand why we wanted the notifiers anyway? Why can't we replace > 'dbs_info->requested_freq' with 'policy->cur' and kill the notifier > thing completely? > > With requested_freq, we are trying to set the next freq to > requested_freq +- Delta, which I am not sure is the best approach > here. > > What would go wrong if we will do, policy->cur +- delta instead? That should work too, but I wanted to avoid changing the governor's behavior too much. So there is a tradeoff between adding a new callback to struct dbs_governor just for conservative and making the latter behave slightly differently and I agree that changing the governor a bit more is better. And of course I'm all for more simplifications, so updated patch is appended. :-) Thanks, Rafael --- From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Subject: [PATCH v2] cpufreq: conservative: Do not use transition notifications The conservative governor registers a transition notifier so it can update its internal requested_freq value if it falls out of the policy->min...policy->max range, but requested_freq is not really necessary. That value is used to track the frequency requested by the governor previously, but policy->cur can be used instead of it and then the governor will not have to worry about updating the tracked value when the current frequency changes independently (for example, as a result of min or max changes). Accodringly, drop requested_freq from struct cs_policy_dbs_info and modify cs_dbs_timer() to use policy->cur instead of it. While at it, notice that __cpufreq_driver_target() clamps its target_freq argument between policy->min and policy->max, so the callers of it don't have to do that and make additional changes in cs_dbs_timer() in accordance with that. After these changes the transition notifier used by the conservative governor is not necessary any more, so drop it, which also makes it possible to drop the struct cs_governor definition and simplify the code accordingly. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> --- drivers/cpufreq/cpufreq_conservative.c | 103 ++++++--------------------------- 1 file changed, 21 insertions(+), 82 deletions(-) Index: linux-pm/drivers/cpufreq/cpufreq_conservative.c =================================================================== --- linux-pm.orig/drivers/cpufreq/cpufreq_conservative.c +++ linux-pm/drivers/cpufreq/cpufreq_conservative.c @@ -17,7 +17,6 @@ struct cs_policy_dbs_info { struct policy_dbs_info policy_dbs; unsigned int down_skip; - unsigned int requested_freq; }; static inline struct cs_policy_dbs_info *to_dbs_info(struct policy_dbs_info *policy_dbs) @@ -75,19 +74,17 @@ static unsigned int cs_dbs_timer(struct /* Check for frequency increase */ if (load > dbs_data->up_threshold) { + unsigned int requested_freq = policy->cur; + dbs_info->down_skip = 0; /* if we are already at full speed then break out early */ - if (dbs_info->requested_freq == policy->max) + if (requested_freq == policy->max) goto out; - dbs_info->requested_freq += get_freq_target(cs_tuners, policy); - - if (dbs_info->requested_freq > policy->max) - dbs_info->requested_freq = policy->max; + requested_freq += get_freq_target(cs_tuners, policy); - __cpufreq_driver_target(policy, dbs_info->requested_freq, - CPUFREQ_RELATION_H); + __cpufreq_driver_target(policy, requested_freq, CPUFREQ_RELATION_H); goto out; } @@ -98,34 +95,26 @@ static unsigned int cs_dbs_timer(struct /* Check for frequency decrease */ if (load < cs_tuners->down_threshold) { - unsigned int freq_target; + unsigned int freq_target, requested_freq = policy->cur; /* * if we cannot reduce the frequency anymore, break out early */ - if (policy->cur == policy->min) + if (requested_freq == policy->min) goto out; freq_target = get_freq_target(cs_tuners, policy); - if (dbs_info->requested_freq > freq_target) - dbs_info->requested_freq -= freq_target; + if (requested_freq > freq_target) + requested_freq -= freq_target; else - dbs_info->requested_freq = policy->min; + requested_freq = policy->min; - __cpufreq_driver_target(policy, dbs_info->requested_freq, - CPUFREQ_RELATION_L); + __cpufreq_driver_target(policy, requested_freq, CPUFREQ_RELATION_L); } out: return dbs_data->sampling_rate; } -static int dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val, - void *data); - -static struct notifier_block cs_cpufreq_notifier_block = { - .notifier_call = dbs_cpufreq_notifier, -}; - /************************** sysfs interface ************************/ static ssize_t store_sampling_down_factor(struct gov_attr_set *attr_set, @@ -254,13 +243,6 @@ static struct attribute *cs_attributes[] /************************** sysfs end ************************/ -struct cs_governor { - struct dbs_governor dbs_gov; - unsigned int usage_count; -}; - -static struct cs_governor cs_gov; - static struct policy_dbs_info *cs_alloc(void) { struct cs_policy_dbs_info *dbs_info; @@ -294,25 +276,11 @@ static int cs_init(struct dbs_data *dbs_ dbs_data->min_sampling_rate = MIN_SAMPLING_RATE_RATIO * jiffies_to_usecs(10); - /* - * This function and cs_exit() are only called under gov_dbs_data_mutex - * which is global, so the cs_gov.usage_count accesses are guaranteed - * to be serialized. - */ - if (!cs_gov.usage_count++) - cpufreq_register_notifier(&cs_cpufreq_notifier_block, - CPUFREQ_TRANSITION_NOTIFIER); - return 0; } static void cs_exit(struct dbs_data *dbs_data) { - /* Protected by gov_dbs_data_mutex - see the comment in cs_init(). */ - if (!--cs_gov.usage_count) - cpufreq_unregister_notifier(&cs_cpufreq_notifier_block, - CPUFREQ_TRANSITION_NOTIFIER); - kfree(dbs_data->tuners); } @@ -321,49 +289,20 @@ static void cs_start(struct cpufreq_poli struct cs_policy_dbs_info *dbs_info = to_dbs_info(policy->governor_data); dbs_info->down_skip = 0; - dbs_info->requested_freq = policy->cur; } -static struct cs_governor cs_gov = { - .dbs_gov = { - .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"), - .kobj_type = { .default_attrs = cs_attributes }, - .gov_dbs_timer = cs_dbs_timer, - .alloc = cs_alloc, - .free = cs_free, - .init = cs_init, - .exit = cs_exit, - .start = cs_start, - }, +static struct dbs_governor cs_governor = { + .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"), + .kobj_type = { .default_attrs = cs_attributes }, + .gov_dbs_timer = cs_dbs_timer, + .alloc = cs_alloc, + .free = cs_free, + .init = cs_init, + .exit = cs_exit, + .start = cs_start, }; -#define CPU_FREQ_GOV_CONSERVATIVE (&cs_gov.dbs_gov.gov) - -static int dbs_cpufreq_notifier(struct notifier_block *nb, unsigned long val, - void *data) -{ - struct cpufreq_freqs *freq = data; - struct cpufreq_policy *policy = cpufreq_cpu_get_raw(freq->cpu); - struct cs_policy_dbs_info *dbs_info; - - if (!policy) - return 0; - - /* policy isn't governed by conservative governor */ - if (policy->governor != CPU_FREQ_GOV_CONSERVATIVE) - return 0; - - dbs_info = to_dbs_info(policy->governor_data); - /* - * we only care if our internally tracked freq moves outside the 'valid' - * ranges of frequency available to us otherwise we do not change it - */ - if (dbs_info->requested_freq > policy->max - || dbs_info->requested_freq < policy->min) - dbs_info->requested_freq = freq->new; - - return 0; -} +#define CPU_FREQ_GOV_CONSERVATIVE (&cs_governor.gov) static int __init cpufreq_gov_dbs_init(void) { ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: conservative: Do not use transition notifications 2016-06-13 13:36 ` Rafael J. Wysocki @ 2016-06-13 15:28 ` Viresh Kumar 2016-06-13 20:57 ` Rafael J. Wysocki 0 siblings, 1 reply; 5+ messages in thread From: Viresh Kumar @ 2016-06-13 15:28 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Linux PM list, Linux Kernel Mailing List, Srinivas Pandruvada On 13-06-16, 15:36, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > Subject: [PATCH v2] cpufreq: conservative: Do not use transition notifications > > The conservative governor registers a transition notifier so it > can update its internal requested_freq value if it falls out of the > policy->min...policy->max range, but requested_freq is not really > necessary. > > That value is used to track the frequency requested by the governor > previously, but policy->cur can be used instead of it and then the > governor will not have to worry about updating the tracked value when > the current frequency changes independently (for example, as a result > of min or max changes). > > Accodringly, drop requested_freq from struct cs_policy_dbs_info > and modify cs_dbs_timer() to use policy->cur instead of it. > While at it, notice that __cpufreq_driver_target() clamps its > target_freq argument between policy->min and policy->max, so > the callers of it don't have to do that and make additional > changes in cs_dbs_timer() in accordance with that. > > After these changes the transition notifier used by the conservative > governor is not necessary any more, so drop it, which also makes it > possible to drop the struct cs_governor definition and simplify the > code accordingly. > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > --- > drivers/cpufreq/cpufreq_conservative.c | 103 ++++++--------------------------- > 1 file changed, 21 insertions(+), 82 deletions(-) > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > -static struct cs_governor cs_gov = { > - .dbs_gov = { > - .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"), > - .kobj_type = { .default_attrs = cs_attributes }, > - .gov_dbs_timer = cs_dbs_timer, > - .alloc = cs_alloc, > - .free = cs_free, > - .init = cs_init, > - .exit = cs_exit, > - .start = cs_start, > - }, > +static struct dbs_governor cs_governor = { > + .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"), > + .kobj_type = { .default_attrs = cs_attributes }, > + .gov_dbs_timer = cs_dbs_timer, > + .alloc = cs_alloc, > + .free = cs_free, > + .init = cs_init, > + .exit = cs_exit, > + .start = cs_start, > }; Though, I am not sure why this change was required :) -- viresh ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: conservative: Do not use transition notifications 2016-06-13 15:28 ` Viresh Kumar @ 2016-06-13 20:57 ` Rafael J. Wysocki 0 siblings, 0 replies; 5+ messages in thread From: Rafael J. Wysocki @ 2016-06-13 20:57 UTC (permalink / raw) To: Viresh Kumar Cc: Linux PM list, Linux Kernel Mailing List, Srinivas Pandruvada On Monday, June 13, 2016 08:58:34 PM Viresh Kumar wrote: > On 13-06-16, 15:36, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > Subject: [PATCH v2] cpufreq: conservative: Do not use transition notifications > > > > The conservative governor registers a transition notifier so it > > can update its internal requested_freq value if it falls out of the > > policy->min...policy->max range, but requested_freq is not really > > necessary. > > > > That value is used to track the frequency requested by the governor > > previously, but policy->cur can be used instead of it and then the > > governor will not have to worry about updating the tracked value when > > the current frequency changes independently (for example, as a result > > of min or max changes). > > > > Accodringly, drop requested_freq from struct cs_policy_dbs_info > > and modify cs_dbs_timer() to use policy->cur instead of it. > > While at it, notice that __cpufreq_driver_target() clamps its > > target_freq argument between policy->min and policy->max, so > > the callers of it don't have to do that and make additional > > changes in cs_dbs_timer() in accordance with that. > > > > After these changes the transition notifier used by the conservative > > governor is not necessary any more, so drop it, which also makes it > > possible to drop the struct cs_governor definition and simplify the > > code accordingly. > > > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > --- > > drivers/cpufreq/cpufreq_conservative.c | 103 ++++++--------------------------- > > 1 file changed, 21 insertions(+), 82 deletions(-) > > > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Thanks! > > -static struct cs_governor cs_gov = { > > - .dbs_gov = { > > - .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"), > > - .kobj_type = { .default_attrs = cs_attributes }, > > - .gov_dbs_timer = cs_dbs_timer, > > - .alloc = cs_alloc, > > - .free = cs_free, > > - .init = cs_init, > > - .exit = cs_exit, > > - .start = cs_start, > > - }, > > +static struct dbs_governor cs_governor = { > > + .gov = CPUFREQ_DBS_GOVERNOR_INITIALIZER("conservative"), > > + .kobj_type = { .default_attrs = cs_attributes }, > > + .gov_dbs_timer = cs_dbs_timer, > > + .alloc = cs_alloc, > > + .free = cs_free, > > + .init = cs_init, > > + .exit = cs_exit, > > + .start = cs_start, > > }; > > Though, I am not sure why this change was required :) This is because struct cs_governor is not necessary any more, since its only member, usage_count, was only needed because of the notifier. So dbs_governor can be used directly here now. Thanks, Rafael ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-06-13 20:53 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-06-10 1:00 [PATCH] cpufreq: conservative: Do not use transition notifications Rafael J. Wysocki 2016-06-13 11:08 ` Viresh Kumar 2016-06-13 13:36 ` Rafael J. Wysocki 2016-06-13 15:28 ` Viresh Kumar 2016-06-13 20:57 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox