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?


On 07/18/2013 05:00 PM, KOSAKI Motohiro wrote:
>> Now we only need to figure out what exactly it does and make that into
>> understandable wording.
> 
> btw, I have an another question. the manual says _SC_NPROCESSORS_CONF could
> be used maximum parallelism performance. But I don't understand why number of
> configured cpus help it.
> 
> Example, if an administrator has found a cpu problem in firmware log and he
> disable one of cpus, and current status is folloing:
> 
> present cpus: 0-7
> online cpus: 0-6
> 
> Why application should think the cpus are 8? I mean cpu offlining is typically
> not short term. And as I already said it doesn't work correct if cpu is hot added
> dynamically. I'm not sure who and when should use this.

The manual is wrong. 

You should use _SC_NPROCESSORS_ONLN.

The manual should be fixed.

There is no reason to recommend using configured processors to
assist in achieving maximum parallelism performance.

Cheers,
Carlos.


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