Skip to content
Commit b78beea0 authored by Pavel Begunkov's avatar Pavel Begunkov Committed by Jens Axboe
Browse files

sbitmap: optimise sbitmap_deferred_clear()



Because of spinlocks and atomics sbitmap_deferred_clear() have to reload
&sb->map[index] on each access even though the map address won't change.
Pass in sbitmap_word instead of {sb, index}, so it's cached in a
variable. It also improves code generation of
sbitmap_find_bit_in_index().

Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent f6f371f7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment