This is the mail archive of the libc-alpha@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]

Re: What *is* the API for sched_getaffinity? Should sched_getaffinity always succeed when using cpu_set_t?


Carlos O'Donell, le Thu 18 Jul 2013 05:14:45 -0400, a écrit :
> Either way the question remains:
> 
> (1) Should glibc's sched_getaffinity never fail?
> 
> or
> 
> (2) Should glibc's sched_getaffinity fail with EINVAL when the size
> of the cpu set is smaller than the size of the affinity mask for
> all possible cpus?
> 
> I believe that a call to sched_getaffinity should not fail.
> 
> What do you think?

Ideally there would have never been a static cpu_set_t type, so the
answer would have been 2). It happens that the hwloc library, in use in
a lot of MPI implementations and batch schedulers, and thus does care
a lot about lots of CPUs, currently depends on 2), because we had seen
that documented in RedHat. We will probably migrate to using "possible"
instead, but it will take time to get propagated to systems, not surely
faster than a newer glibc that breaks it.

Samuel


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