Subject: Re: README: dynamic sysctl
To: Andrew Brown <atatat@atatdot.net>
From: Nicolas Joly <njoly@pasteur.fr>
List: current-users
Date: 12/05/2003 18:42:30
On Thu, Dec 04, 2003 at 03:56:14PM -0500, Andrew Brown wrote:
> it took a while, but i've just committed complete rewrite of the
> kernel's sysctl infrastructure to the tree.  it might sound a little
> scary, but it's a good thing.
[...]
> but that's it.  have fun.  lemme know if you like it, if anything
> seems broken, etc.

I noticed that, at least on amd64, sysctl does not set (or return) the
correct CPU number for multiprocessor machines :

njoly@calimero [~]> sysctl hw.ncpu
hw.ncpu = 1

njoly@calimero [~]> dmesg
NetBSD 1.6ZG (GENERIC.MP) #1: Fri Dec  5 17:54:05 CET 2003
        njoly@calimero.sis.pasteur.fr:/local/src/NetBSD/obj/amd64/sys/arch/amd64/compile/GENERIC.MP
total memory = 4031 MB
avail memory = 3680 MB
using 6144 buffers containing 201 MB of memory
mainbus0 (root)
mainbus0: Intel MP Specification (Version 1.4) (TYAN     S2880       )
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Opteron(tm) Processor 242, 1593.36 MHz
cpu0: features: e7dbfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features: e7dbfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,NOX,MMXX,MMX>
cpu0: features: e7dbfbff<FXSR,SSE,SSE2,LONG,3DNOW2,3DNOW>
cpu0: I-cache 64 KB 64b/line 2-way, D-cache 64 KB 64b/line 2-way
cpu0: L2 cache 1 MB 64b/line 16-way
cpu0: ITLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
cpu0: DTLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
cpu0: calibrating local timer
cpu0: apic clock running at 199 MHz
cpu0: 16 page colors
cpu1 at mainbus0: apid 1 (application processor)
cpu1: starting
cpu1: AMD Opteron(tm) Processor 242, 1593.31 MHz
cpu1: features: e7dbfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu1: features: e7dbfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,NOX,MMXX,MMX>
cpu1: features: e7dbfbff<FXSR,SSE,SSE2,LONG,3DNOW2,3DNOW>
cpu1: I-cache 64 KB 64b/line 2-way, D-cache 64 KB 64b/line 2-way
cpu1: L2 cache 1 MB 64b/line 16-way
cpu1: ITLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
cpu1: DTLB 32 4 KB entries fully associative, 8 4 MB entries fully associative
mpbios: bus 0 is type PCI
[...]

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.