aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/futex-contention.py
diff options
context:
space:
mode:
authorOGAWA Hirofumi <[email protected]>2012-06-07 22:20:18 +0900
committerIngo Molnar <[email protected]>2012-06-13 15:08:37 +0200
commit2f74759056797054122cdc70844137f70bb3f626 (patch)
treee5ccff03a7fda3be1217923d973e8ba2f405a531 /tools/perf/scripts/python/futex-contention.py
parentb0a4c6f2e3fce088eb597d4b9ee2075cb6399ee1 (diff)
x86/alternatives: Use atomic_xchg() instead atomic_dec_and_test() for stop_machine_text_poke()
stop_machine_text_poke() uses atomic_dec_and_test() to select one of the CPUs executing that function to actually modify the code. Since the variable is initialized to 1, subsequent CPUs will make the variable go negative. Since going negative is uncommon/unexpected in typical dec_and_test usage change this user to atomic_xchg(). This was found using a patch that warns on dec_and_test going negative. Signed-off-by: OGAWA Hirofumi <[email protected]> Acked-by: Steven Rostedt <[email protected]> [ Rewrote changelog ] Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/futex-contention.py')
0 files changed, 0 insertions, 0 deletions