Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754177AbXLEKYX (ORCPT ); Wed, 5 Dec 2007 05:24:23 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751909AbXLEKYQ (ORCPT ); Wed, 5 Dec 2007 05:24:16 -0500 Received: from barracuda.cse.unsw.EDU.AU ([129.94.172.9]:56545 "EHLO barracuda.cse.unsw.edu.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbXLEKYP (ORCPT ); Wed, 5 Dec 2007 05:24:15 -0500 X-Greylist: delayed 1041 seconds by postgrey-1.27 at vger.kernel.org; Wed, 05 Dec 2007 05:24:15 EST X-ASG-Debug-ID: 1196849229-7b1a00130000-xx1T2L X-Barracuda-URL: http://129.94.172.9:8000/cgi-bin/mark.cgi X-CSE-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on tone.orchestra.cse.unsw.EDU.AU X-CSE-Spam-Level: X-CSE-Spam-Status: No, score=-2.6 required=4.0 tests=BAYES_00,UNPARSEABLE_RELAY autolearn=ham version=3.1.3 From: Aaron Carroll To: Jens Axboe Date: Wed, 05 Dec 2007 21:07:07 +1100 Message-ID: <4756784B.40607@gelato.unsw.edu.au> User-Agent: Thunderbird 2.0.0.9 (X11/20071116) MIME-Version: 1.0 CC: linux-kernel@vger.kernel.org, npiggin@suse.de, Peter Chubb X-ASG-Orig-Subj: [PATCH] as-iosched: fix write batch start point Subject: [PATCH] as-iosched: fix write batch start point Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Barracuda-Connect: tone.orchestra.cse.unsw.EDU.AU[129.94.242.59] X-Barracuda-Start-Time: 1196849229 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at cse.unsw.edu.au Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1139 Lines: 31 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 --- block/as-iosched.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/block/as-iosched.c b/block/as-iosched.c index 4513fc5..555cd6b 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; } -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/