+12
−12
Loading
mainline inclusion from mainline-v5.11-rc1 commit b78beea0 category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/IB4C27 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b78beea038a3087df63bba7adaacb476a8ca95af ------------------------------------------- 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:Pavel Begunkov <asml.silence@gmail.com> Reviewed-by:
John Garry <john.garry@huawei.com> Signed-off-by:
Jens Axboe <axboe@kernel.dk> Signed-off-by:
Zheng Qixing <zhengqixing@huawei.com>