aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAaron Carroll <aaronc@gelato.unsw.edu.au>2007-10-30 05:40:13 -0400
committerJens Axboe <axboe@carl.home.kernel.dk>2007-11-02 03:47:25 -0400
commitdfb3d72a9aa519672c9ae06f0d2f93eccb35482f (patch)
treed6ec7e9b0e0ddbfa1acf59819caca071b1e1f29c /block
parent5d1a536621403b442eef60ddd35e6b7a46fb04b7 (diff)
Deadline iosched: Reset batch for ordered requests
The deadline I/O scheduler does not reset the batch count when starting a new batch at a higher-sectored request. This means the second and subsequent batch in the same data direction will never exceed a single request in size whenever higher-sectored requests are pending. This patch gives new batches in the same data direction as old ones their full quota of requests by resetting the batch count. Signed-off-by: Aaron Carroll <aaronc@gelato.unsw.edu.au> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/deadline-iosched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index a44437e5a94b..cb94c838087a 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -306,12 +306,11 @@ dispatch_writes:
306dispatch_find_request: 306dispatch_find_request:
307 /* 307 /*
308 * we are not running a batch, find best request for selected data_dir 308 * we are not running a batch, find best request for selected data_dir
309 * and start a new batch
309 */ 310 */
310 if (deadline_check_fifo(dd, data_dir)) { 311 if (deadline_check_fifo(dd, data_dir)) {
311 /* An expired request exists - satisfy it */ 312 /* An expired request exists - satisfy it */
312 dd->batching = 0;
313 rq = rq_entry_fifo(dd->fifo_list[data_dir].next); 313 rq = rq_entry_fifo(dd->fifo_list[data_dir].next);
314
315 } else if (dd->next_rq[data_dir]) { 314 } else if (dd->next_rq[data_dir]) {
316 /* 315 /*
317 * The last req was the same dir and we have a next request in 316 * The last req was the same dir and we have a next request in
@@ -325,12 +324,13 @@ dispatch_find_request:
325 * higher-sectored requests. Go back to the lowest sectored 324 * higher-sectored requests. Go back to the lowest sectored
326 * request (1 way elevator) and start a new batch. 325 * request (1 way elevator) and start a new batch.
327 */ 326 */
328 dd->batching = 0;
329 node = rb_first(&dd->sort_list[data_dir]); 327 node = rb_first(&dd->sort_list[data_dir]);
330 if (node) 328 if (node)
331 rq = rb_entry_rq(node); 329 rq = rb_entry_rq(node);
332 } 330 }
333 331
332 dd->batching = 0;
333
334dispatch_request: 334dispatch_request:
335 /* 335 /*
336 * rq is the selected appropriate request. 336 * rq is the selected appropriate request.