blk-mq-sched: add framework for MQ capable IO schedulers
authorJens Axboe <axboe@fb.com>
Fri, 16 Dec 2016 22:55:20 +0000 (15:55 -0700)
committerJens Axboe <axboe@fb.com>
Sat, 17 Dec 2016 00:13:38 +0000 (17:13 -0700)
commit4453d5cb329c70888794c3c07ae0c1baad1e961a
tree5d3ed9c1e321d78e08e77c07750601cbc7cf9c6e
parent3ce34906b872bb9c2734d73d4aabc0e87d2d0edd
blk-mq-sched: add framework for MQ capable IO schedulers

This adds a set of hooks that intercepts the blk-mq path of
allocating/inserting/issuing/completing requests, allowing
us to develop a scheduler within that framework.

We reuse the existing elevator scheduler API on the registration
side, but augment that with the scheduler flagging support for
the blk-mq interfce, and with a separate set of ops hooks for MQ
devices.

Schedulers can opt in to using shadow requests. Shadow requests
are internal requests that the scheduler uses for for the allocate
and insert part, which are then mapped to a real driver request
at dispatch time. This is needed to separate the device queue depth
from the pool of requests that the scheduler has to work with.

Signed-off-by: Jens Axboe <axboe@fb.com>
12 files changed:
block/Makefile
block/blk-core.c
block/blk-exec.c
block/blk-flush.c
block/blk-merge.c
block/blk-mq-sched.c [new file with mode: 0644]
block/blk-mq-sched.h [new file with mode: 0644]
block/blk-mq.c
block/blk-mq.h
block/elevator.c
include/linux/blk-mq.h
include/linux/elevator.h