Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-23 Thread Jens Axboe
On Mon, Oct 22 2007, [EMAIL PROTECTED] wrote: > Jens Axboe [EMAIL PROTECTED] wrote: > > Current code is below, btw. Not a lot of changes, iirc it's just the > > delete-always, a missing export, delete timer on empty list. > > > > +void blk_add_timer(struct request *req) > > +{ > > + struct reque

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-22 Thread malahal
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote: > Jens Axboe [EMAIL PROTECTED] wrote: > > Current code is below, btw. Not a lot of changes, iirc it's just the > > delete-always, a missing export, delete timer on empty list. > > > > +void blk_add_timer(struct request *req) > > +{ > > + struct request_

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-22 Thread malahal
Jens Axboe [EMAIL PROTECTED] wrote: > Current code is below, btw. Not a lot of changes, iirc it's just the > delete-always, a missing export, delete timer on empty list. > > +void blk_add_timer(struct request *req) > +{ > + struct request_queue *q = req->q; > + unsigned long expiry; > + >

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-11 Thread Jens Axboe
On Thu, Oct 11 2007, Jens Axboe wrote: > On Thu, Oct 11 2007, [EMAIL PROTECTED] wrote: > > > @@ -3600,24 +3618,132 @@ static struct notifier_block __devinitdata > > > blk_cpu_notifier = { > > > }; > > > > > > /** > > > - * blk_complete_request - end I/O on a request > > > - * @req: the req

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-11 Thread Jens Axboe
On Thu, Oct 11 2007, [EMAIL PROTECTED] wrote: > > @@ -3600,24 +3618,132 @@ static struct notifier_block __devinitdata > > blk_cpu_notifier = { > > }; > > > > /** > > - * blk_complete_request - end I/O on a request > > - * @req: the request being processed > > + * blk_delete_timer - Delete/

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-11 Thread malahal
Jens Axboe [EMAIL PROTECTED] wrote: > On Tue, Oct 09 2007, James Bottomley wrote: > > On Tue, 2007-10-09 at 14:15 +0200, Jens Axboe wrote: > > > On Tue, Oct 09 2007, Matthew Wilcox wrote: > > > > On Mon, Oct 08, 2007 at 10:36:10PM -0700, [EMAIL PROTECTED] wrote: > > > > > Thank you Randy, Jens for

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-10 Thread Jens Axboe
On Wed, Oct 10 2007, [EMAIL PROTECTED] wrote: > I don't see blk_delete_timer() actually calling mod_timer/del_timer at > all. Doesn't that mean, your timer would eventually expire for no > reason and walk through the list unnecessarily? Please stop top posting, thanks. Yeah, it can only remove t

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-10 Thread malahal
I don't see blk_delete_timer() actually calling mod_timer/del_timer at all. Doesn't that mean, your timer would eventually expire for no reason and walk through the list unnecessarily? Thanks, Malahal. Jens Axboe [EMAIL PROTECTED] wrote: > On Tue, Oct 09 2007, James Bottomley wrote: > > On Tue,

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-10 Thread Jens Axboe
On Tue, Oct 09 2007, James Bottomley wrote: > On Tue, 2007-10-09 at 14:15 +0200, Jens Axboe wrote: > > On Tue, Oct 09 2007, Matthew Wilcox wrote: > > > On Mon, Oct 08, 2007 at 10:36:10PM -0700, [EMAIL PROTECTED] wrote: > > > > Thank you Randy, Jens for your suggestions. I folded the second patch as

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-09 Thread malahal
If we don't need precise timeout, we can have one single timer running at regular intervals, say every second. We also record the exact number of requests that are supposed to be done in a particular interval. This is done by computing the 'interval index' of a request, incrementing it when we send

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-09 Thread James Bottomley
On Tue, 2007-10-09 at 14:15 +0200, Jens Axboe wrote: > On Tue, Oct 09 2007, Matthew Wilcox wrote: > > On Mon, Oct 08, 2007 at 10:36:10PM -0700, [EMAIL PROTECTED] wrote: > > > Thank you Randy, Jens for your suggestions. I folded the second patch as > > > it is just a clean up. Here is the fixed one

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-09 Thread malahal
Here is another attempt! Thank you. diff -r 1b51503899a0 block/ll_rw_blk.c --- a/block/ll_rw_blk.c Thu Sep 27 00:25:15 2007 -0700 +++ b/block/ll_rw_blk.c Tue Oct 09 07:00:51 2007 -0700 @@ -181,6 +181,18 @@ void blk_queue_softirq_done(struct reque EXPORT_SYMBOL(blk_queue_softirq_done); +void

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-09 Thread Jens Axboe
On Tue, Oct 09 2007, Matthew Wilcox wrote: > On Mon, Oct 08, 2007 at 10:36:10PM -0700, [EMAIL PROTECTED] wrote: > > Thank you Randy, Jens for your suggestions. I folded the second patch as > > it is just a clean up. Here is the fixed one patch version. > > I was thinking about this (in the context

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-09 Thread Matthew Wilcox
On Mon, Oct 08, 2007 at 10:36:10PM -0700, [EMAIL PROTECTED] wrote: > Thank you Randy, Jens for your suggestions. I folded the second patch as > it is just a clean up. Here is the fixed one patch version. I was thinking about this (in the context of shrinking scsi_cmnd -- obviously, things are not

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-09 Thread Jens Axboe
On Mon, Oct 08 2007, [EMAIL PROTECTED] wrote: > Thank you Randy, Jens for your suggestions. I folded the second patch as > it is just a clean up. Here is the fixed one patch version. > > Signed-off-by: Mike Christie <[EMAIL PROTECTED]> > Signed-off-by: Malahal Naineni <[EMAIL PROTECTED]> > > Than

Re: [RFC] [PATCH 1/1] blk request timeout handler patches

2007-10-08 Thread malahal
Thank you Randy, Jens for your suggestions. I folded the second patch as it is just a clean up. Here is the fixed one patch version. Signed-off-by: Mike Christie <[EMAIL PROTECTED]> Signed-off-by: Malahal Naineni <[EMAIL PROTECTED]> Thanks, Malahal. diff -r 2cd6b249e335 block/ll_rw_blk.c --- a/b