[lkml]   [2016]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH V4 4/7] cpufreq: governor: Move common sysfs tunables to cpufreq_governor.c
On Tue, Feb 9, 2016 at 4:46 AM, Viresh Kumar <> wrote:
> We have got five common sysfs tunables between ondemand and conservative
> governors, move their callbacks to cpufreq_governor.c to get rid of
> redundant code.
> Because of minor differences in the implementation of the callbacks,
> some more per-governor callbacks are introduced in order to not
> introduce any more "governor == ONDEMAND/CONSERVATIVE" like checks.
> Signed-off-by: Viresh Kumar <>
> Tested-by: Juri Lelli <>
> Tested-by: Shilpasri G Bhat <>

To me, the benefit from this patch is marginal and the cost is quite

The code is really only duplicate if both governors are non-modular or
their modules are both loaded at the same time and it's not worth
adding the new governor callbacks IMO.

If the implementation of the given show/store pair is different enough
that you need an extra callback to move them to _governor.c, I won't
bother doing that.


 \ /
  Last update: 2016-02-10 01:41    [W:0.118 / U:2.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site