kern/190169: Increase MAXCPU on amd64 systems

Tim Bishop tim at bishnet.net
Sat May 24 10:30:01 UTC 2014


>Number:         190169
>Category:       kern
>Synopsis:       Increase MAXCPU on amd64 systems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 24 10:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Tim Bishop
>Release:        FreeBSD 11.0-CURRENT amd64
>Organization:
>Environment:
System: FreeBSD buzzard 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r266603M: Sat May 24 03:25:35 BST 2014 tdb at buzzard:/usr/obj/usr/src/sys/GENERIC amd64

	4x Intel(R) Xeon(R) CPU E7-4830 v2 @ 2.20GHz (2200.05-MHz K8-class CPU)
	This gives 40 cores with a total of 80 threads.

>Description:
	In param.h MAXCPU is set to 64. This results in 16 of the
	80 threads being disabled at boot time, and errors like:

	FreeBSD/SMP: Multiprocessor System Detected: 64 CPUs
	FreeBSD/SMP: 3 package(s) x 10 core(s) x 2 SMT threads
	 cpu0 (BSP): APIC ID:  0
	 cpu1 (AP): APIC ID:  1
	 ...
	 cpu62 (AP): APIC ID: 98
	 cpu63 (AP): APIC ID: 99
	  cpu (AP): APIC ID: 100 (disabled)
	  cpu (AP): APIC ID: 101 (disabled)
	  cpu (AP): APIC ID: 102 (disabled)
	  cpu (AP): APIC ID: 103 (disabled)
	  cpu (AP): APIC ID: 104 (disabled)
	  cpu (AP): APIC ID: 105 (disabled)
	  cpu (AP): APIC ID: 112 (disabled)
	  cpu (AP): APIC ID: 113 (disabled)
	  cpu (AP): APIC ID: 114 (disabled)
	  cpu (AP): APIC ID: 115 (disabled)
	  cpu (AP): APIC ID: 116 (disabled)
	  cpu (AP): APIC ID: 117 (disabled)
	  cpu (AP): APIC ID: 118 (disabled)
	  cpu (AP): APIC ID: 119 (disabled)
	  cpu (AP): APIC ID: 120 (disabled)
	  cpu (AP): APIC ID: 121 (disabled)
	WARNING: Non-uniform processors.
	WARNING: Using suboptimal topology.

>How-To-Repeat:
	Boot any recent FreeBSD version, including HEAD, on a system
	with more than 64 CPU cores/threads.

>Fix:
	The current top end processors have 15 cores and 30 threads.
	So a quad socket system would have a total of 120 threads.
	I believe this should be supported in GENERIC so FreeBSD
	works out of the box. The patch below does this.

	It'd be nice to see this MFCed to stable/10 so it makes the
	10.1 release. It'd be even nicer to see it MFCed to stable/9
	for 9.3, but I suspect it'll be too late for that.

	For what it's worth I tested the most recent Ubuntu release
	and it detected all the threads out of the box.

	Some consideration should also be given to kern/185831. It
	has been committed but I don't think it has been MFCed yet.
	I can confirm that I don't receive any panic on HEAD with
	MAXCPU set to 128 and with witness enabled.

--- diff begins here ---
Index: sys/amd64/include/param.h
===================================================================
--- sys/amd64/include/param.h	(revision 266603)
+++ sys/amd64/include/param.h	(working copy)
@@ -65,7 +65,7 @@
 
 #if defined(SMP) || defined(KLD_MODULE)
 #ifndef MAXCPU
-#define MAXCPU		64
+#define MAXCPU		128
 #endif
 #else
 #define MAXCPU		1
--- diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list