Skip to content

Commit

Permalink
as-iosched: fix write batch start point
Browse files Browse the repository at this point in the history
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 <aaronc@gelato.unsw.edu.au>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
  • Loading branch information
Aaron Carroll authored and Jens Axboe committed Dec 18, 2007
1 parent 8896f3c commit 4956512
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion block/as-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,8 @@ static int as_dispatch_request(struct request_queue *q, int force)
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;
}

Expand Down

0 comments on commit 4956512

Please sign in to comment.