Searched hist:c3250c8d (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/lib/ |
H A D | sbitmap.c | c3250c8d Sun Nov 22 09:35:47 CST 2020 Pavel Begunkov <asml.silence@gmail.com> sbitmap: replace CAS with atomic and
sbitmap_deferred_clear() does CAS loop to propagate cleared bits, replace it with equivalent atomic bitwise and. That's slightly faster and makes wait-free instead of lock-free as before.
The atomic can be relaxed (i.e. barrier-less) because following sbitmap_get*() deal with synchronisation, see comments in sbitmap_queue_clear().
It's ok to cast to atomic_long_t, that's what bitops/lock.h does.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
|