This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/15630] Fix use of cpu_set_t with sched_getaffinity when booted on a system with more than 1024 possible cpus.


https://sourceware.org/bugzilla/show_bug.cgi?id=15630

--- Comment #7 from Florian Weimer <fweimer at redhat dot com> ---
What is the actual problem that we are trying to fix?

We could make sched_getaffinity succeed if the affinity mask contains only zero
bits outside the mask buffer supplied by the application.  But then, the only
way to run an application which specifies too small a set would require
preventing the application from running on those extra CPUs.  This could leave
parts of the machine unused.

We cannot drop discard set bits because some concurrent algorithms need to know
on which CPUs they can run.

I do not want to introduce a CPU number offset in user space (which could be
used to run multiple small-affinity-set applications on all CPUs).  This is
probably something for the kernel.  Container/namespace support for affinity
masks may even make sense for other reasons.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]