Re: [PATCH] sbitmap: Consider cleared bits in sbitmap_bitmap_show()

2020-07-01 Thread Jens Axboe
On 7/1/20 2:06 AM, John Garry wrote: > sbitmap works by maintaining separate bitmaps of set and cleared bits. > The set bits are cleared in a batch, to save the burden of continuously > locking the "word" map to unset. > > sbitmap_bitmap_show() only shows the set bits (in "word"), which is not >

[PATCH] sbitmap: Consider cleared bits in sbitmap_bitmap_show()

2020-07-01 Thread John Garry
sbitmap works by maintaining separate bitmaps of set and cleared bits. The set bits are cleared in a batch, to save the burden of continuously locking the "word" map to unset. sbitmap_bitmap_show() only shows the set bits (in "word"), which is not too much use, so mask out the cleared bits.