[lkml]   [2007]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: getting processor numbers
    Davide Libenzi wrote:
    > It sucks when seen from a micro-bench POV, but does it really matter
    > overall? The vast majority of software usually calls
    > sysconf(_SC_NPROCESSORS_*) with very little frequency (mostly once at
    > initialization time) anyway. That's what 50us / call?

    This is not today's situation. Yes, 10 years ago when I added the
    support to glibc it wasn't much of a problem. But times change. As I
    said before in this thread, OpenMP by default scales the number of
    threads used for a parallel loops depending on the number of available
    processors/cores and therefore the number must be retrieved every time
    (with perhaps minimal caching of a few secs, but this requires
    gettimeofday calls...). All of a sudden this is not micro benchmark
    anymore. It's a real issue which we only became aware of because it is
    noticeable in real life.

    ➧ Ulrich Drepper ➧ Red Hat, Inc. ➧ 444 Castro St ➧ Mountain View, CA ❖

    [unhandled content-type:application/pgp-signature]
     \ /
      Last update: 2007-04-03 21:35    [W:0.019 / U:154.272 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site