block/bfq: serialize request dispatching
If we're entering request dispatch but someone else is already
dispatching, then just skip this dispatch. We know IO is inflight and
this will trigger another dispatch event for any completion. This will
potentially cause slightly lower queue depth for contended cases, but
those are slowed down anyway and this should not cause an issue.
By itself, this patch doesn't help a whole lot, as the dispatch
lock contention reduction is just eaten up by the same bfqd->lock now
seeing increased insertion contention. But it's required work to be
able to reduce the lock contention in general.
Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Signed-off-by: Jens Axboe <axboe@kernel.dk>