]> git.baikalelectronics.ru Git - kernel.git/commit
blk-mq-sched: separate mark hctx and queue restart operations
authorOmar Sandoval <osandov@fb.com>
Wed, 22 Feb 2017 18:58:30 +0000 (10:58 -0800)
committerJens Axboe <axboe@fb.com>
Thu, 23 Feb 2017 18:55:47 +0000 (11:55 -0700)
commitbbf51e6e5939eb7b8315807322b5f3df80fce0ad
treeea9eb2e3a10f286ec6813026d6a52a4483602cd4
parentcf5fabdf9a35a56923a7c1d5d3c9fd9854504875
blk-mq-sched: separate mark hctx and queue restart operations

In blk_mq_sched_dispatch_requests(), we call blk_mq_sched_mark_restart()
after we dispatch requests left over on our hardware queue dispatch
list. This is so we'll go back and dispatch requests from the scheduler.
In this case, it's only necessary to restart the hardware queue that we
are running; there's no reason to run other hardware queues just because
we are using shared tags.

So, split out blk_mq_sched_mark_restart() into two operations, one for
just the hardware queue and one for the whole request queue. The core
code only needs the hctx variant, but I/O schedulers will want to use
both.

This also requires adjusting blk_mq_sched_restart_queues() to always
check the queue restart flag, not just when using shared tags.

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