[PATCH] The size of CPU sets, __CPU_SETSIZE is too small

Changsheng.Liu liuchangsheng@inspur.com
Fri Aug 5 12:38:00 GMT 2016


From: Changsheng Liu <liuchangsheng@inspur.com>

Now the size of struct cpu_set_t is 1024 bits,
But there are many thousands of cores in the server
and the cpumask in the Linux Kernel has been expanded to
5120 bits (CONFIG_NR_CPUS=5120).
So in this patch the size of CPU sets is expanded to 5120
for the server that has many thousands of cores

Signed-off-by: Changsheng Liu <liuchangsheng@inspur.com>
---
 bits/sched.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bits/sched.h b/bits/sched.h
index ca10569..a9ba623 100644
--- a/bits/sched.h
+++ b/bits/sched.h
@@ -52,7 +52,7 @@ struct __sched_param
 #if defined _SCHED_H && !defined __cpu_set_t_defined
 # define __cpu_set_t_defined
 /* Size definition for CPU sets.  */
-# define __CPU_SETSIZE	1024
+# define __CPU_SETSIZE	5120
 # define __NCPUBITS	(8 * sizeof (__cpu_mask))
 
 /* Type for array elements in 'cpu_set_t'.  */
-- 
1.8.3.1



More information about the Libc-alpha mailing list