commit | b78beea038a3087df63bba7adaacb476a8ca95af | [log] [tgz] |
---|---|---|
author | Pavel Begunkov <[email protected]> | Sun Nov 22 15:35:45 2020 +0000 |
committer | Jens Axboe <[email protected]> | Mon Dec 07 17:12:49 2020 -0700 |
tree | 296886e70357e7c8b78718e3604126d4867c1e0e | |
parent | f6f371f7db42917c7b2a861c4fc923cb352ce5a1 [diff] |
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: Pavel Begunkov <[email protected]> Reviewed-by: John Garry <[email protected]> Signed-off-by: Jens Axboe <[email protected]>