Skip to content
  • Emilio G. Cota's avatar
    070e3edc
    tests: add atomic_add-bench · 070e3edc
    Emilio G. Cota authored
    
    
    With this microbenchmark we can measure the overhead of emulating atomic
    instructions with a configurable degree of contention.
    
    The benchmark spawns $n threads, each performing $o atomic ops (additions)
    in a loop. Each atomic operation is performed on a different cache line
    (assuming lines are 64b long) that is randomly selected from a range [0, $r).
    
    [ Note: each $foo corresponds to a -foo flag ]
    
    Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
    Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
    Message-Id: <1467054136-10430-20-git-send-email-cota@braap.org>
    070e3edc
    tests: add atomic_add-bench
    Emilio G. Cota authored
    
    
    With this microbenchmark we can measure the overhead of emulating atomic
    instructions with a configurable degree of contention.
    
    The benchmark spawns $n threads, each performing $o atomic ops (additions)
    in a loop. Each atomic operation is performed on a different cache line
    (assuming lines are 64b long) that is randomly selected from a range [0, $r).
    
    [ Note: each $foo corresponds to a -foo flag ]
    
    Signed-off-by: default avatarEmilio G. Cota <cota@braap.org>
    Signed-off-by: default avatarRichard Henderson <rth@twiddle.net>
    Message-Id: <1467054136-10430-20-git-send-email-cota@braap.org>
Loading