• Paul E. McKenney's avatar
    refperf: More closely synchronize reader start times · 86e0da2b
    Paul E. McKenney authored
    Currently, readers are awakened individually.  On most systems, this
    results in significant wakeup delay from one reader to the next, which
    can result in the first and last reader having sole access to the
    synchronization primitive in question.  If that synchronization primitive
    involves shared memory, those readers will rack up a huge number of
    operations in a very short time, causing large perturbations in the
    results.
    
    This commit therefore has the readers busy-wait after being awakened,
    and uses a new n_started variable to synchronize their start times.
    
    Cc: Joel Fernandes (Google) <joel@joelfernandes.org>
    Signed-off-by: default avatarPaul E. McKenney <paulmck@kernel.org>
    86e0da2b
refperf.c 13.2 KB