SMP in machine/params.h

Pietro Cerutti gahr at gahr.ch
Thu Jan 24 05:38:15 PST 2008


Some more interesting findings in this field lead me to another related
question:

what is the relation between kern.smp.cpus, kern.smp.active and
kern.smp.maxcpus?

To my understanding, it should be:
If the machine has more than one CPU, and SMP and apic are enabled in
the config file, then

kern.smp.cpus = nof cpus in the system
kern.smp.active = 1
kern.smp.maxcpus = 16

else

kern.smp.cpus = 1
kern.smp.active = 0
kern.smp.maxcpus = 1

This is the expected result, and also the result I get from my single
CPU Pentium 3, running 6.3-RELEASE:

kern.smp.cpus: 1
kern.smp.active: 0
kern.smp.maxcpus: 1

From my single CPU sparc64, running 7.0-PRERELEASE, I get:

kern.smp.cpus: 1
kern.smp.active: 0
kern.smp.maxcpus: 16 <-- why not 1??

From my Core2Due, running 8.0-CURRENT, I get:

kern.smp.cpus: 2
kern.smp.active: 1
kern.smp.maxcpus: 16

which is OK, but nevertheless SMP is not defined in sys/param.h (see
previous posts).


Thanks for any insight,




-- 
Pietro Cerutti

PGP Public Key:
http://gahr.ch/pgp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20080124/9e033011/signature.pgp


More information about the freebsd-hackers mailing list