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: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Sharyathi Nagesh <sharyath at in dot ibm dot com>
- Cc: libc-help at sourceware dot org, suzuki <suzuki at in dot ibm dot com>, "Rishikesh K. Rajak" <risrajak at in dot ibm dot com>
- Date: Thu, 29 Oct 2009 09:42:47 -0400
- Subject: Re: [RFC] [PATCH] sched_getaffinity() fails with -EINVAL
- References: <4AD5AFAA.40107@in.ibm.com> <4AD85932.3000308@in.ibm.com> <4AE93B14.8080804@in.ibm.com>
On Thu, Oct 29, 2009 at 2:49 AM, Sharyathi Nagesh <sharyath@in.ibm.com> wrote:
> 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.
As Bert suggests you could port your code to the CPU_*_S macros
instead of using sched_*affinity() functions.
However, since both APIs work on the same data, it would be nice to
have both of them working and supporting the max cpu set size
supported by the kernel.
Your patch however lacks a lot of thing, please see the contribution checklist:
http://sourceware.org/glibc/wiki/Contribution%20checklist
In particular please show that changing this constant doesn't cause
problems when booting on older kernels.
Cheers,
Carlos.