提交 49565124 编写于 作者: A Aaron Carroll 提交者: Jens Axboe

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: NAaron Carroll <aaronc@gelato.unsw.edu.au>
Acked-by: NNick Piggin <npiggin@suse.de>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 8896f3c0
...@@ -1097,7 +1097,8 @@ static int as_dispatch_request(struct request_queue *q, int force) ...@@ -1097,7 +1097,8 @@ static int as_dispatch_request(struct request_queue *q, int force)
ad->batch_data_dir = REQ_ASYNC; ad->batch_data_dir = REQ_ASYNC;
ad->current_write_count = ad->write_batch_count; ad->current_write_count = ad->write_batch_count;
ad->write_batch_idled = 0; 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; goto dispatch_request;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册