All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] as-iosched: fix write batch start point
@ 2007-12-05 10:07 Aaron Carroll
  2007-12-05 10:14 ` Nick Piggin
  0 siblings, 1 reply; 3+ messages in thread
From: Aaron Carroll @ 2007-12-05 10:07 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-kernel, npiggin, Peter Chubb

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>
---
 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;
 	}
 
-- 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-12-05 10:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-05 10:07 [PATCH] as-iosched: fix write batch start point Aaron Carroll
2007-12-05 10:14 ` Nick Piggin
2007-12-05 10:15   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.