Commit dfb3d72a9aa519672c9ae06f0d2f93eccb35482f

Authored by Aaron Carroll
Committed by Jens Axboe
1 parent 5d1a536621

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>

Showing 1 changed file with 3 additions and 3 deletions Side-by-side Diff

block/deadline-iosched.c
... ... @@ -306,12 +306,11 @@
306 306 dispatch_find_request:
307 307 /*
308 308 * we are not running a batch, find best request for selected data_dir
  309 + * and start a new batch
309 310 */
310 311 if (deadline_check_fifo(dd, data_dir)) {
311 312 /* An expired request exists - satisfy it */
312   - dd->batching = 0;
313 313 rq = rq_entry_fifo(dd->fifo_list[data_dir].next);
314   -
315 314 } else if (dd->next_rq[data_dir]) {
316 315 /*
317 316 * The last req was the same dir and we have a next request in
318 317  
... ... @@ -325,11 +324,12 @@
325 324 * higher-sectored requests. Go back to the lowest sectored
326 325 * request (1 way elevator) and start a new batch.
327 326 */
328   - dd->batching = 0;
329 327 node = rb_first(&dd->sort_list[data_dir]);
330 328 if (node)
331 329 rq = rb_entry_rq(node);
332 330 }
  331 +
  332 + dd->batching = 0;
333 333  
334 334 dispatch_request:
335 335 /*