* [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
* Re: [PATCH] as-iosched: fix write batch start point
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
0 siblings, 1 reply; 3+ messages in thread
From: Nick Piggin @ 2007-12-05 10:14 UTC (permalink / raw)
To: Aaron Carroll; +Cc: Jens Axboe, linux-kernel, Peter Chubb
On Wed, Dec 05, 2007 at 09:07:07PM +1100, Aaron Carroll wrote:
> 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>
I think this seems reasonable. What's deadline doing in this case?
They should probably be kept in synch where possible...
Acked-by: Nick Piggin <npiggin@suse.de>
> ---
> 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 [flat|nested] 3+ messages in thread
* Re: [PATCH] as-iosched: fix write batch start point
2007-12-05 10:14 ` Nick Piggin
@ 2007-12-05 10:15 ` Jens Axboe
0 siblings, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2007-12-05 10:15 UTC (permalink / raw)
To: Nick Piggin; +Cc: Aaron Carroll, linux-kernel, Peter Chubb
On Wed, Dec 05 2007, Nick Piggin wrote:
> On Wed, Dec 05, 2007 at 09:07:07PM +1100, Aaron Carroll wrote:
> > 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>
>
> I think this seems reasonable. What's deadline doing in this case?
> They should probably be kept in synch where possible...
Aaron sent a similar patch for deadline a while ago, so this just
matches them up again. I acked that patch, it makes a lot of sense to
me.
--
Jens Axboe
^ permalink raw reply [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.