[PATCH] ARM: formalize an IPI for CPU wake-ups

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Jun 11 14:26:40 EDT 2012


On Mon, Jun 11, 2012 at 01:18:28PM -0400, Nicolas Pitre wrote:
> And that message certainly has to go as it may be triggered multiple 
> times per second in some use cases here.

That, I interpret, as an attempt to use CPU hotplugging for power
saving.

No.  Do not do that.  Under any circumstances.  Not only is the CPU
hotplugging code racy in places, it also totally destroys the ability
to have threads bound to CPUs, or even interrupts to CPUs.

It's also racy with userspace.  Think of an application which wants to
know how many CPUs are online to create a number of threads, then you
take a CPU offline.  There's no way for it to be notified about that.
Or, conversely you bring a CPU online.  Again, no way for userspace to
be properly notified.

Then there's issues with reading /proc/interrupts while CPUs come and
go, especially when you have large numbers of interrupts which have to
be read across multiple reads.

Then there's all the driver model events sent into userspace when the
sysfs nodes for CPUs come and go.

So no, I'd point out that the message you get is the _least_ of your
problems if you're playing this idiotic game.  Don't do it.  Use CPU
idle instead.  That's what it's there for.



More information about the linux-arm-kernel mailing list