[PATCH] glibc: Remove CPU set size checking from affinity functions [BZ #19143]

Florian Weimer fweimer@redhat.com
Fri Oct 16 15:06:00 GMT 2015


I still believe this is the right course of action.

This is a straight rebase of an old glibc patch, this time with a bug
and a NEWS entry.

The goal of this patch is to remove the CPU set size checking in user
space from the glibc system call wrappers for the sched_setaffinity
system call (that is, sched_setaffinity and pthread_setaffinity_np).

The previous discussion is here:

  <https://sourceware.org/ml/libc-alpha/2015-05/msg00449.html>

I do not have any new arguments to bring forward.  I can try to explain
what is going on in a few different words, though.

The current situation, briefly stated, is this: glibc tries to guess the
kernel CPU set size and rejects attempts to specify an affinity mask
which is larger than that, but it does not work, and glibc and the
kernel still silently accept CPU affinity masks with invalid bits,
without returning an error.  The glibc check does not provide any value
to applications, it just adds pointless complexity to the library.
Therefore, I want to remove it from glibc.

Thanks,
Florian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-CPU-set-size-checking-from-affinity-functions.patch
Type: text/x-patch
Size: 28137 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20151016/7996f352/attachment.bin>


More information about the Libc-alpha mailing list