Re: Remove hotplug cpu crap from cpufreq.

From: Dipankar Sarma
Date: Thu Nov 02 2006 - 14:06:55 EST


Andrew,

On Wed, Nov 01, 2006 at 04:17:23PM -0800, Andrew Morton wrote:
> On Wed, 1 Nov 2006 15:09:52 -0800 (PST)
> Linus Torvalds <torvalds@xxxxxxxx> wrote:
>
> Gautham's work is "add lots of complex machinery so cpufreq's existing crap
> works as it was supposed to". We end up with complex machinery as well as
> crappy cpufreq.
>
> The alternative is to rip all that stuff out of cpufreq and then go back
> and reimplement cpufreq cpu-hotplug safety from scratch.

No matter what we do with cpufreq, cpufreq needs to protect itself against
the cpu going away. I am not too confident about the long term viability of the
implicit callback order-based locking. Sooner or later, someone
will add another complex per-cpu subsystem with calls to another
per-cpu subsystem and will violate locking order between the two
subsystems.

IMO, the right thing to do would be to convert lock_cpu_hotplug() to
a get_cpu_hotplug()/put_cpu_hotplug() type semantics and use a more
scalable implementation underneath (as opposed to a global
semaphore/mutex).

We have had some discussion on taking a look at the overall design
of the cpufreq and its cpu drivers themselves, but we need
solve this issue in the short term.

Thanks
Dipankar
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/