Re: [PATCH v2 6/10] cpufreq: Support for fast frequency switching

From: Ingo Molnar
Date: Sat Mar 05 2016 - 06:59:01 EST



* Rafael J. Wysocki <rafael@xxxxxxxxxx> wrote:

> > Honestly I wonder if it's better to just try the "no notifiers with fast
> > drivers" approach to start. The notifiers could always be added if platform
> > owners complain that they absolutely require them.
>
> Well, I'm not sure what happens if we start to fail notifier registrations. It
> may not be a well tested error code path. :-)

Yeah, so as a general principle 'struct notifier_block' as a really bad interface
with poor and fragile semantics, and we are trying to get rid of them everywhere
from core kernel code. For example Thomas Gleixner et al is working on eliminating
them from the CPU hotplug code - which will get rid of most remaining notifier
uses from the scheduler as well.

So please add explicit cpufreq driver callback functions instead, which can be
filled in by a platform if needed. No notifiers!

Thanks,

Ingo