Re: [PATCH 2/2] sbitmap: optimize wakeup check

2018-11-30 Thread Omar Sandoval
On Fri, Nov 30, 2018 at 09:01:18AM -0700, Jens Axboe wrote: > Even if we have no waiters on any of the sbitmap_queue wait states, we > still have to loop every entry to check. We do this for every IO, so > the cost adds up. > > Shift a bit of the cost to the slow path, when we actually have waiter

[PATCH 2/2] sbitmap: optimize wakeup check

2018-11-30 Thread Jens Axboe
Even if we have no waiters on any of the sbitmap_queue wait states, we still have to loop every entry to check. We do this for every IO, so the cost adds up. Shift a bit of the cost to the slow path, when we actually have waiters. Wrap prepare_to_wait_exclusive() and finish_wait(), so we can maint

[PATCH 2/2] sbitmap: optimize wakeup check

2018-11-29 Thread Jens Axboe
Even if we have no waiters on any of the sbitmap_queue wait states, we still have to loop every entry to check. We do this for every IO, so the cost adds up. Shift a bit of the cost to the slow path, when we actually have waiters. Wrap prepare_to_wait_exclusive() and finish_wait(), so we can maint