PDA

View Full Version : New CPU, enable SMP


Weaseal
January 16th, 2009, 08:32
Hi all,
I just replaced my AMD Athlon64 3500+ (single core) with a dual-core 4200+. Do I have to do anything to get FreeBSD to access the extra core? I made sure options SMP is enabled in the kernel config.

Is there a way to dynamically check to see how many cores it recognizes?

ale
January 16th, 2009, 08:38
Check with sysctl hw.ncpu

DutchDaemon
January 16th, 2009, 11:11
And also top -P should show how many CPUs are used (and how).

Weaseal
January 16th, 2009, 16:43
$ sysctl hw.ncpu
hw.ncpu: 1

$ dmesg | grep -i cpu
CPU: AMD Athlon(tm) 64 Processor 4200+ (2200.10-MHz K8-class CPU)
cpu0: <ACPI CPU> on acpi0
powernow0: <Cool`n'Quiet K8> on cpu0
acpi_throttle0: <ACPI CPU Throttling> on cpu0What gives?

kamikaze
January 16th, 2009, 17:32
Maybe the second core is deactivated in the BIOS. In FreeBSD 7.1 the default kernel is an SMP kernel, so you do not have to activate anything.

Weaseal
January 16th, 2009, 17:33
I have read somewhere online that some motherboards require you to flash the BIOS when replacing a CPU (especially if you are adding cores)... could this be it?

I'll double-check the BIOS.

kamikaze
January 16th, 2009, 17:51
It might be that the CPU was not available when your motherboard was built and you require a new BIOS version.

cpcnw
March 2nd, 2010, 11:23
I'd like to attempt a custom kernel on my X2 - currently ;


$ cat /var/run/dmesg.boot | grep CPU
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ (2700.27-MHz 686-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
SMP: AP CPU #1 Launched!


and


$ top -P [sniped]
CPU 0: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle
CPU 1: 0.4% user, 0.0% nice, 0.0% system, 0.0% interrupt, 99.6% idle


Is CPU0 even used? And is all that is required is to leave in my KERNCONF;


options SMP # Symmetric MultiProcessor Kernel
device apic # I/O APIC