summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/check-perf-trace.py
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2024-05-23 12:19:26 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-07-15 02:00:12 +0300
commit68573b936d3fceda9cd5cce3a577e035d19ad426 (patch)
tree872f291bf9b8d6f439c9d0a5bd372d42557e8e6b /tools/perf/scripts/python/check-perf-trace.py
parente76a2b65b0565f55ea668ec46d54f6a00b8ea9fc (diff)
downloadlinux-68573b936d3fceda9cd5cce3a577e035d19ad426.tar.xz
bcachefs: Use try_cmpxchg() family of functions instead of cmpxchg()
Use try_cmpxchg() family of functions instead of cmpxchg (*ptr, old, new) == old. x86 CMPXCHG instruction returns success in ZF flag, so this change saves a compare after cmpxchg (and related move instruction in front of cmpxchg). Also, try_cmpxchg() implicitly assigns old *ptr value to "old" when cmpxchg fails. There is no need to re-read the value in the loop. No functional change intended. Signed-off-by: Uros Bizjak <ubizjak@gmail.com> Cc: Kent Overstreet <kent.overstreet@linux.dev> Cc: Brian Foster <bfoster@redhat.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/check-perf-trace.py')
0 files changed, 0 insertions, 0 deletions