[glibc] Fix Linux sysconf(_SC_NPROCESSORS_[CONF|ONLN]) performance problem

Roland McGrath roland@hack.frob.com
Thu Jun 16 18:27:00 GMT 2011


> But the caching is needed, because whatever the process wants, I
> guarantee that it doesn't want "slow and crappy".

The caching is also wrong, since in a long-lived program it could have been
sampled before more processors came online or went offline.  I'm not sure
there is any solution that is both correct and performant with the current
kernel interface.  The kernel could provide some efficient means of query.


Thanks,
Roland



More information about the Libc-alpha mailing list