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: [glibc] Fix Linux sysconf(_SC_NPROCESSORS_[CONF|ONLN]) performance problem


Linus Torvalds, le Thu 16 Jun 2011 09:38:55 -0700, a écrit :
>  - cache the value in a static variable, so that if/when there are
> multiple calls, we don't spend time recalculating the number of CPU's
> in the system unnecessarily.

Mmm, but what if the process starts with only one allowed CPU, and
then is given more CPUs? (either by making CPUs online, or by using
sched_setaffinity from an administration tool).

Samuel


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