This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [glibc] Fix Linux sysconf(_SC_NPROCESSORS_[CONF|ONLN])performance problem
> 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