SUMMARY: Oddball ordering of CPUs in SS1000 confuses "top"?

From: Greg Earle (earle@isolar.Tujunga.CA.US)
Date: Fri Nov 25 1994 - 03:02:18 CST

Back on Nov. 12th in message <> I wrote:
> We recently added an extra CPU board ("system board", I should say)
> to a couple of SPARCserver 1000's at work. Each SS1000 now has 3 system
> boards with 2 CPUs on one board and one each on the other two.
> The net result (after "boot -r") is that the CPU ordering is a bit whacko:
> ss1000:1:40 [/usr/src/top-3.3] % egrep -i "cpu[0123456789s]" /var/adm/mess*
> Nov 11 07:16:09 ss1000 unix: cpu0: BW Prescaler/XDBus Frequency=40MHz
> Nov 11 07:16:23 ss1000 unix: number of CPUs: 4
> Nov 11 07:16:23 ss1000 unix: cpu2: BW Prescaler/XDBus Frequency=40MHz
> Nov 11 07:16:25 ss1000 unix: cpu4: BW Prescaler/XDBus Frequency=40MHz
> Nov 11 07:16:25 ss1000 unix: cpu1: BW Prescaler/XDBus Frequency=40MHz
> I haven't got the vaguest idea why they're numbered "0", "2", "4" and "1".
> (Or why the "cpu-unit" numbers are "0", "1", "9" and "6". Huh?)
> Anyway, this causes "top" (3.3 beta 3) to blow its cookies, undoubtedly
> because it probably got told that "ncpu" was 4, and it either fried itself
> trying to access an array offset for "cpu3" or else because the offset for
> "cpu4" ends up being outside the array limits for cpu_offset[ncpu].

It turns out that whether or not there is a CPU in the board slot is
irrelevant, the numbering scheme stays the same no matter what. In other
words, system board 0 has "cpu0" and "cpu1"; system board 1 has "cpu2" and
"cpu3", system board 2 has "cpu4" and "cpu5", etc. etc. and so on.

I'm still not quite sure why it finds 0, 2, 4 and (only) then 1 - since "1"
is on the same board as "0" - but maybe it likes to check for even-numbered
CPU slots first :-)

Anyway, my comment about "top" was a little off the mark. It turns out that
my officemate had compiled "top", and the version he had was actually the very
first 3.3beta release (3.3beta1, for lack of a better term). I downloaded
the latest (3.3beta3) and there is code in machine/m_sunos5.c to deal with
this very issue. "top" is now happy as a clam.

Thanks to all who responded:

        Jason L Tibbitts III <>
        Casper Dik <>
        Birger A. Wathne <>
        Michael A. Cooper <>
        Joshua Walfish <>
        John DiMarco <>
        John Allen <>

- Greg Earle                    WWW:
  Phone: (818) 353-8695                 FAX: (818) 353-1877 [Call # again if
  E-mail: earle@isolar.Tujunga.CA.US			     you get !FAX tone]
  "Sufficiently advanced cluelessness is indistinguishable from malice" - JPC 

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:15 CDT