block/bfq: serialize request dispatching
authorJens Axboe <axboe@kernel.dk>
Sat, 20 Jan 2024 21:54:37 +0000 (14:54 -0700)
committerJens Axboe <axboe@kernel.dk>
Mon, 1 Apr 2024 22:03:34 +0000 (16:03 -0600)
commit8e496c90ce39ca1a54fd94c80b9da79d35db0f23
tree65efadb35f18d00df47fcad28baf5a2b46077cc9
parent047dddf0bb1f29678b08d804fcb40faf666dca43
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>
block/bfq-iosched.c
block/bfq-iosched.h