online, possible and disabled cpus

Robert P. J. Day rpjday at crashcourse.ca
Tue Oct 23 04:42:30 EDT 2012


On Tue, 23 Oct 2012, Srivatsa Bhat wrote:

> I don't think we should worry too much about this.. I can think of a
> simple reason why one would want to iterate through all possible
> CPUs.. : IIUC, this function prints, for each softirq, the number of
> times it ran on a particular CPU. So if a CPU was online for a while
> and then was taken offline, in order to print the softirq stats
> properly (including how many times it ran on that CPU when it was
> online), we will have to iterate through all possible CPUs.. That is
> a simple and valid reason, IMHO.

  that's the same reason i came up with as well, but it still seems
somewhat lazy -- how hard would it be to have a bitmap that shows
whether a possible CPU was *ever* active/online, and print
accordingly?  but this inspired another thought.

  a lot of this complexity is introduced if you configure your kernel
with CONFIG_HOTPLUG_CPU, and there are a lot of references to that in
the kernel source tree:

$ grep -rw CONFIG_HOTPLUG_CPU * | wc -l
332
$

but how many people really need to have a CPU-hotpluggable kernel?
it would seem that you could simplify things by just turning off that
option.  i'm puzzled that the default x86 config files have that
option turned on.

  seriously, how many people out there are hotplugging CPUs?  i'm just
curious.  and is there any obvious drawback to just unconfiguring that
option?

rday

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================



More information about the Kernelnewbies mailing list