]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq: improve tag waiting setup for non-shared tags
authorJens Axboe <axboe@kernel.dk>
Thu, 9 Nov 2017 23:10:13 +0000 (16:10 -0700)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Nov 2017 02:55:57 +0000 (19:55 -0700)
commit56593f7a0214c452bbd22d6ce324e2556090bbf1
treef688bc86c652853b8eea76600bee3583de31c416
parentcf736805b3c1921a798fc0a7641403c629079d81
blk-mq: improve tag waiting setup for non-shared tags

If we run out of driver tags, we currently treat shared and non-shared
tags the same - both cases hook into the tag waitqueue. This is a bit
more costly than it needs to be on unshared tags, since we have to both
grab the hctx lock, and the waitqueue lock (and disable interrupts).
For the non-shared case, we can simply mark the queue as needing a
restart.

Split blk_mq_dispatch_wait_add() to account for both cases, and
rename it to blk_mq_mark_tag_wait() to better reflect what it
does now.

Without this patch, shared and non-shared performance is about the same
with 4 fio thread hammering on a single null_blk device (~410K, at 75%
sys). With the patch, the shared case is the same, but the non-shared
tags case runs at 431K at 71% sys.

Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c