Re: [PATCH v2 1/4] sbitmap: optimise sbitmap_deferred_clear()

2020-11-24 Thread Pavel Begunkov
On 24/11/2020 14:11, John Garry wrote: > On 22/11/2020 15:35, Pavel Begunkov wrote: >> 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

Re: [PATCH v2 1/4] sbitmap: optimise sbitmap_deferred_clear()

2020-11-24 Thread John Garry
On 22/11/2020 15:35, Pavel Begunkov wrote: 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