From: Aaron Carroll Date: Wed, 5 Dec 2007 10:07:07 +0000 (+1100) Subject: as-iosched: fix write batch start point X-Git-Tag: v2.6.24-rc6~19^2~2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=49565124b13bb16607e7f8fc8fb1d9c5c355a1a3;p=linux-2.6-omap-h63xx.git as-iosched: fix write batch start point New write batches currently start from where the last one completed. We have no idea where the head is after switching batches, so this makes little sense. Instead, start the next batch from the request with the earliest deadline in the hope that we avoid a deadline expiry later on. Signed-off-by: Aaron Carroll Acked-by: Nick Piggin Signed-off-by: Jens Axboe --- diff --git a/block/as-iosched.c b/block/as-iosched.c index 4513fc59c9d..555cd6bf4ce 100644 --- a/block/as-iosched.c +++ b/block/as-iosched.c @@ -1097,7 +1097,8 @@ dispatch_writes: ad->batch_data_dir = REQ_ASYNC; ad->current_write_count = ad->write_batch_count; ad->write_batch_idled = 0; - rq = ad->next_rq[ad->batch_data_dir]; + rq = rq_entry_fifo(ad->fifo_list[REQ_ASYNC].next); + ad->last_check_fifo[REQ_ASYNC] = jiffies; goto dispatch_request; }