Files
linux/block
Uros Bizjak f4b1e27db4 block/rq_qos: Use atomic_try_cmpxchg in atomic_inc_below
Use atomic_try_cmpxchg instead of atomic_cmpxchg (*ptr, old, new) == old in
atomic_inc_below. 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_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 <ubizjak@gmail.com>
Cc: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20220712150547.5786-1-ubizjak@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2022-07-12 14:38:52 -06:00
..
2022-06-16 16:59:28 -06:00
2022-06-27 06:29:12 -06:00
2022-07-06 06:46:25 -06:00
2020-03-17 20:55:21 +01:00
2022-07-06 06:46:25 -06:00
2022-07-06 06:46:25 -06:00
2022-03-31 12:58:38 -06:00
2021-09-14 00:22:15 -04:00
2022-02-02 07:49:59 -07:00
2021-10-18 06:17:01 -06:00
2022-06-27 06:29:11 -06:00
2022-02-02 07:49:59 -07:00
2022-03-07 12:48:35 -07:00