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


On Thu, Jun 16, 2011 at 14:07, Linus Torvalds
<torvalds@linux-foundation.org> wrote:
> But the caching is needed, because whatever the process wants, I
> guarantee that it doesn't want "slow and crappy".

And how do we find out when the system changes?  CPUs can be added,
CPU masks can be changed, even from outside the process.  Not everyone
will agree that updates to this information can be ignored.

I would be happy to use any new interface to get to this information
more quickly.  Then we can do caching.  This is no new thing.  For
instance, we need a similar mechanism to make getaddrinfo acceptable
because currently we always have to pull the kernel data.  This was
discussed a bit a long time ago and we discussed having a way to query
the kernel "has the configuration X been changed since Y", where X is
CPU settings, network interfaces, ... and Y is some timestamp.

Do you have interest in reviving that discussion?


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