diff options
author | Jens Axboe <axboe@fb.com> | 2017-01-13 16:43:58 -0500 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-17 12:04:31 -0500 |
commit | d34849913819a5e0cbfbe724dbe79df89278c524 (patch) | |
tree | 71b427fa3b22b30dc2038448ec06936018adaee4 /block/blk-mq.c | |
parent | 945ffb60c11dfb228130f3f2bdde961cecb76671 (diff) |
blk-mq-sched: allow setting of default IO scheduler
Add Kconfig entries to manage what devices get assigned an MQ
scheduler, and add a blk-mq flag for drivers to opt out of scheduling.
The latter is useful for admin type queues that still allocate a blk-mq
queue and tag set, but aren't use for normal IO.
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Diffstat (limited to 'block/blk-mq.c')
-rw-r--r-- | block/blk-mq.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/block/blk-mq.c b/block/blk-mq.c index 45e1707a9f86..fa1f8619bfe7 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c | |||
@@ -2285,6 +2285,14 @@ struct request_queue *blk_mq_init_allocated_queue(struct blk_mq_tag_set *set, | |||
2285 | mutex_unlock(&all_q_mutex); | 2285 | mutex_unlock(&all_q_mutex); |
2286 | put_online_cpus(); | 2286 | put_online_cpus(); |
2287 | 2287 | ||
2288 | if (!(set->flags & BLK_MQ_F_NO_SCHED)) { | ||
2289 | int ret; | ||
2290 | |||
2291 | ret = blk_mq_sched_init(q); | ||
2292 | if (ret) | ||
2293 | return ERR_PTR(ret); | ||
2294 | } | ||
2295 | |||
2288 | return q; | 2296 | return q; |
2289 | 2297 | ||
2290 | err_hctxs: | 2298 | err_hctxs: |