----- "Luciano Chavez" <lnx1138(a)linux.vnet.ibm.com> wrote:
Hi Dave,
Thinking about backward compatibility, would displaying "ONLINE CPUS"
still seem OK for the case where kernel_init() finds the smp_num_cpus
symbol (as for a 2.4 kernel)? Before there were the various cpu maps, I
think smp_num_cpus was analogous to the possible cpus as opposed to
online. I can see this requiring some thought as to what CPUS in the
output means when you have various different maps now (online, possible,
and present). That being said, it would be good to leave no doubt and
explicitly state the count is for the present or online CPUS with the
latter being my suggestion.
I forgot to mention that I suspect the problem I mentioned before would
get stranger for POWER7 which offers 4 threads per core. I didn't have
access to a POWER7 machine to see just what it would do if we tried
disabling SMT as before but it follows the same pattern the count
displayed would be way off from the online count.
I just ran through a bunch of stashed dumpfiles I have on hand, and
it gets even murkier when dealing with Xen or KVM kernels, because
as part of the post-crash shutdown (or forced dump), all but one of
the cpus may be taken "offline". So even though there may be 4 vcpus,
and crash correctly shows 4 "CPUS", the cpu_online_map shows only one
cpu bit. So if we went ahead and displayed a number based upon the
cpu_online_map, it would completely misleading. Incorrect actually...
Dave