[PATCH] ARM: report present cpus in /proc/cpuinfo
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Jun 21 19:05:12 EDT 2011
On Tue, Jun 21, 2011 at 03:56:24PM -0700, Jon Mayo wrote:
> Because arm linux likes to dynamically hotplug cpus, the meaning of
> online has changed slightly. Previously online meant a cpus is
> schedulable, and conversely offline means they it is not schedulable.
> But with the current power management infrastructure there are cpus
> that can be scheduled (after they are woken up automatically), yet are
> not considered "online" because the masks and flags for them are not
There be sharks here. glibc can read /proc/cpuinfo to find out how
many CPUs are online. glibc can also read /proc/stat to determine
Both files should be using the same test to ensure consistency. That
is using the online mask, not the present mask.
If a CPU is hot unplugged (and therefore the bit is clear in the online
map) then it is not available for scheduling, and the system will not
wake the CPU up without intervention, no matter how high the load will
become, without userspace assistance.
So I don't think your change is correct, and the code as it stands is
More information about the linux-arm-kernel