Re: [PATCH] sbitmap: don't loop for find_next_zero_bit() for !round_robin

2018-11-29 Thread Jens Axboe
On 11/29/18 12:42 PM, Omar Sandoval wrote: > On Thu, Nov 29, 2018 at 12:34:12PM -0700, Jens Axboe wrote: >> If we aren't forced to do round robin tag allocation, just use the >> allocation hint to find the index for the tag word, don't use it for the >> offset inside the word. > > Maybe also add

Re: [PATCH] sbitmap: don't loop for find_next_zero_bit() for !round_robin

2018-11-29 Thread Omar Sandoval
On Thu, Nov 29, 2018 at 12:34:12PM -0700, Jens Axboe wrote: > If we aren't forced to do round robin tag allocation, just use the > allocation hint to find the index for the tag word, don't use it for the > offset inside the word. Maybe also add "We're already fetching that cache line, so we might

[PATCH] sbitmap: don't loop for find_next_zero_bit() for !round_robin

2018-11-29 Thread Jens Axboe
If we aren't forced to do round robin tag allocation, just use the allocation hint to find the index for the tag word, don't use it for the offset inside the word. This avoids a potential extra round trip in the bit looping. Signed-off-by: Jens Axboe --- diff --git a/lib/sbitmap.c