diff options
author | Jens Axboe <axboe@fb.com> | 2017-01-26 12:40:07 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-01-27 08:20:35 -0700 |
commit | c13660a08c8b3bb49def4374bfd414aaaa564662 (patch) | |
tree | c7a61741aba75e320838865f176092c07af37f95 /include/linux/elevator.h | |
parent | 50e1dab86aa2c10cbca2f754aae9542169403141 (diff) | |
download | lwn-c13660a08c8b3bb49def4374bfd414aaaa564662.tar.gz lwn-c13660a08c8b3bb49def4374bfd414aaaa564662.zip |
blk-mq-sched: change ->dispatch_requests() to ->dispatch_request()
When we invoke dispatch_requests(), the scheduler empties everything
into the passed in list. This isn't always a good thing, since it
means that we remove items that we could have potentially merged
with.
Change the function to dispatch single requests at the time. If
we do that, we can backoff exactly at the point where the device
can't consume more IO, and leave the rest with the scheduler for
better merging and future dispatch decision making.
Signed-off-by: Jens Axboe <axboe@fb.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Tested-by: Hannes Reinecke <hare@suse.com>
Diffstat (limited to 'include/linux/elevator.h')
-rw-r--r-- | include/linux/elevator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h index ecb96fd67c6d..b5825c4f06f7 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -92,7 +92,7 @@ struct elevator_mq_ops { struct request *(*get_request)(struct request_queue *, unsigned int, struct blk_mq_alloc_data *); void (*put_request)(struct request *); void (*insert_requests)(struct blk_mq_hw_ctx *, struct list_head *, bool); - void (*dispatch_requests)(struct blk_mq_hw_ctx *, struct list_head *); + struct request *(*dispatch_request)(struct blk_mq_hw_ctx *); bool (*has_work)(struct blk_mq_hw_ctx *); void (*completed_request)(struct blk_mq_hw_ctx *, struct request *); void (*started_request)(struct request *); |