diff options
author | Uros Bizjak <[email protected]> | 2022-07-14 18:33:01 +0200 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2022-07-24 18:39:18 -0600 |
commit | 4ccc6db0900fe337212b61650663a5dcedb69f25 (patch) | |
tree | 48c46809c46a9461f9f33c3b1e12f6602fa168ba /tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | |
parent | 9bb66906f23e50d6db1e11f7498b72dfca1982a2 (diff) |
io_uring: Use atomic_long_try_cmpxchg in __io_account_mem
Use atomic_long_try_cmpxchg instead of
atomic_long_cmpxchg (*ptr, old, new) == old in __io_account_mem.
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, atomic_long_try_cmpxchg implicitly assigns old *ptr value
to "old" when cmpxchg fails, enabling further code simplifications.
No functional change intended.
Signed-off-by: Uros Bizjak <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Pavel Begunkov <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py')
0 files changed, 0 insertions, 0 deletions