diff options
author | Uros Bizjak <[email protected]> | 2024-03-21 20:52:47 +0100 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2024-04-11 15:14:54 +0200 |
commit | 79a34e3d8411050c3c7550c5163d6f9dc41e8f66 (patch) | |
tree | ddc759da727ab424638b4ea0cfa5200201e0a787 /tools/perf/scripts/python/exported-sql-viewer.py | |
parent | 21689e4bfb9ae8f8b45279c53faecaa5a056ffa5 (diff) |
locking/qspinlock: Use atomic_try_cmpxchg_relaxed() in xchg_tail()
Use atomic_try_cmpxchg_relaxed(*ptr, &old, new) instead of
atomic_cmpxchg_relaxed (*ptr, old, new) == old in xchg_tail().
x86 CMPXCHG instruction returns success in ZF flag,
so this change saves a compare after CMPXCHG.
No functional change intended.
Since this code requires NR_CPUS >= 16k, I have tested it
by unconditionally setting _Q_PENDING_BITS to 1 in
<asm-generic/qspinlock_types.h>.
Signed-off-by: Uros Bizjak <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Reviewed-by: Waiman Long <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/exported-sql-viewer.py')
0 files changed, 0 insertions, 0 deletions