blk-mq: first cut deadline scheduling mq-deadline
authorJens Axboe <axboe@fb.com>
Thu, 19 Feb 2015 22:26:43 +0000 (14:26 -0800)
committerJens Axboe <axboe@fb.com>
Thu, 19 Feb 2015 22:26:43 +0000 (14:26 -0800)
commitc2ed2f2dcf928b38d824728e88444c887255f040
tree4a3c1d40340cde2bb8022a474381432579e38fcb
parent89d3fa45b4add00cd0056361a2498e978cb1e119
blk-mq: first cut deadline scheduling

Option for per-hw queue or all hw queue scheduling. Some rough edges
around restart of queue(s) that need to be looked at some more.
Additionally, it probably makes sense to track which queues should be
restarted, so we don't just blindly restart all of them. This could
unify ATOM_RESTART and ATOM_RESTART_ALL to be the same operation,
since both would look at what queues to restart.

Current tracking is done utilizing the blk-mq tag iterators. Both
queued and started requests are accounted for. We don't dispatch a
request if older requests haven't been dispatched yet.

When queueing is invoked, we always dispatch (at least) one request.
This may violate deadlines slightly. Currently this is done to avoid
further complicating the restart logic. Right now we know that a queue
will dispatch at least one request, if restarted and has requests
pending.

sysfs attributes are currently per-hw queue, should probably tie them
together for some of the cases.

It does read vs write deadlines, not sync vs async. Could make that
an option.

Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq-sysfs.c
block/blk-mq-tag.c
block/blk-mq.c
block/blk.h
drivers/block/mtip32xx/mtip32xx.c
drivers/block/null_blk.c
drivers/block/nvme-core.c
drivers/scsi/scsi_lib.c
include/linux/blk-mq.h
include/linux/blkdev.h