diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2019-05-23 18:39:16 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2019-07-01 11:57:12 -0600 |
commit | 417232880c8a646739dbf4666a231505a1917fcb (patch) | |
tree | db1dc62d7382a6571e0e5ace415281baa1884c43 /block/kyber-iosched.c | |
parent | 79d08f89bb1b5c2c1ff90d9bb95497ab9e8aa7e0 (diff) | |
download | lwn-417232880c8a646739dbf4666a231505a1917fcb.tar.gz lwn-417232880c8a646739dbf4666a231505a1917fcb.zip |
sbitmap: Replace cmpxchg with xchg
cmpxchg() with an immediate value could be replaced with less expensive
xchg(). The same true if new value don't _depend_ on the old one.
In the second block, atomic_cmpxchg() return value isn't checked, so
after atomic_cmpxchg() -> atomic_xchg() conversion it could be replaced
with atomic_set(). Comparison with atomic_read() in the second chunk was
left as an optimisation (if that was the initial intention).
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/kyber-iosched.c')
0 files changed, 0 insertions, 0 deletions