Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Aug 2014 14:35:59 -0400
From:      John Baldwin <>
Subject:   Bumping cpuset_t size and MAXCPU on amd64 to 256
Message-ID:  <>

Next in thread | Raw E-Mail | Index | Archive | Help
There was an earlier thread about this a few months ago and after fixing a few 
other places (already committed) the patch below has survived a universe 
build.  Does anyone have any objections to these going in?  Note that the 
_cpuset.h change changes the size of 'cpuset_t' in userland for all platforms.  
Due to the way the cpuset system calls work (and the libc routines), this 
should not be an ABI change (the caller always encodes the size of the set as 
an argument to the system call).

Also, note that on amd64 the kernel won't actually handle more than 255 CPUs 
(a few places still use u_char which Adrian is preparing to beat into 
submission, but we also can't support APIC IDs > 0xfe until we grow true 
x2APIC support).

Index: sys/amd64/include/param.h
--- sys/amd64/include/param.h   (revision 269991)
+++ sys/amd64/include/param.h   (working copy)
@@ -65,7 +65,7 @@
 #if defined(SMP) || defined(KLD_MODULE)
 #ifndef MAXCPU
-#define MAXCPU         64
+#define MAXCPU         256
 #define MAXCPU         1
Index: sys/sys/_cpuset.h
--- sys/sys/_cpuset.h   (revision 269991)
+++ sys/sys/_cpuset.h   (working copy)
@@ -38,7 +38,7 @@
 #define        CPU_SETSIZE     MAXCPU
-#define        CPU_MAXSIZE     128
+#define        CPU_MAXSIZE     256
 #ifndef        CPU_SETSIZE
 #define        CPU_SETSIZE     CPU_MAXSIZE

John Baldwin

Want to link to this message? Use this URL: <>