[lkml]   [2019]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/7] cpufreq: Call transition notifier only once for each policy
On Thu, Mar 14, 2019 at 10:28 AM Rafael J. Wysocki <> wrote:
> On Thu, Mar 14, 2019 at 7:43 AM Viresh Kumar <> wrote:
> >
> > Currently we call the cpufreq transition notifiers once for each CPU of
> > the policy->cpus cpumask, which isn't that efficient.
> Why isn't it efficient?
> Transitions are per-policy anyway, so if something needs to be done
> for each CPU in the policy, it doesn't matter too much which part of
> the code carries out the iteration.
> I guess some notifiers need to know what other CPUs there are in the
> policy? If so, then why?
> > This patchset tries to simplify that by adding another field in struct cpufreq_freqs,
> > cpus, so the callback has all the information available with a single
> > call for each policy.
> Well, you can argue that the core is simplified by it somewhat, but
> the notifiers aren't. They actually get more complex, conceptually
> too, because they now need to worry about offline vs online CPUs etc.
> Also I wonder why you decided to pass a cpumask in freqs instead of
> just passing a policy pointer. If you change things from per-CPU to
> per-policy, passing the whole policy seems more natural.

It also looks to me like all that needs to be one patch, or you have
the ugly transition situation in which notifiers are still invoked for
each CPU, but they assume to be invoked once per policy.

 \ /
  Last update: 2019-03-14 10:41    [W:0.149 / U:1.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site