This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: [RFC] [PATCH] sched_getaffinity() fails with -EINVAL
- From: Sharyathi Nagesh <sharyath at in dot ibm dot com>
- To: libc-help at sourceware dot org
- Cc: suzuki <suzuki at in dot ibm dot com>, "Rishikesh K. Rajak" <risrajak at in dot ibm dot com>, "Carlos O'Donell" <carlos at systemhalted dot org>
- Date: Thu, 29 Oct 2009 12:19:56 +0530
- Subject: Re: [RFC] [PATCH] sched_getaffinity() fails with -EINVAL
- References: <4AD5AFAA.40107@in.ibm.com> <4AD85932.3000308@in.ibm.com>
Hi
This is the patch I am proposing to fix the issue, I had mentioned earlier in this mailing
list.
Is it possible to accommodate the patch in glibc ?
This increased the CPU SETSIZE to reflect kernel capabilities. Other wise cpuset data
structures will support only 1096 CPUS while kernel can do 4096.
Let me know your thoughts
Thanks
Sharyathi
Index: glibc/bits/sched.h
===================================================================
--- glibc.orig/bits/sched.h 2009-10-29 11:09:30.000000000 +0530
+++ glibc/bits/sched.h 2009-10-29 12:14:20.000000000 +0530
@@ -38,7 +38,7 @@
#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 4096
# define __NCPUBITS (8 * sizeof (__cpu_mask))
/* Type for array elements in 'cpu_set'. */