From: James Bottomley <James.Bottomley@SteelEye.com>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Matthew Wilcox <matthew@wil.cx>, linux-scsi@vger.kernel.org
Subject: Re: [RFC] [PATCH 1/1] blk request timeout handler patches
Date: Tue, 09 Oct 2007 10:56:12 -0500 [thread overview]
Message-ID: <1191945372.3294.28.camel@localhost.localdomain> (raw)
In-Reply-To: <20071009121524.GO5241@kernel.dk>
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, malahal@us.ibm.com 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 improved if we simply move the timer to request
> > instead of scsi_cmnd). Why do we need a timer _per request_? We don't
> > need one per network packet. I appreciate we had one per scsi_cmnd and
> > this patch is just moving it upwards in the hierarchy, but perhaps we
> > can do better.
> >
> > What if we have one timer per request queue instead? It needs to expire
> > as soon as the earliest request timer would expire, then needs to be
> > reset to the next earliest one. We might walk the request queue more
> > frequently, but we'd save 48 bytes in the struct request.
>
> I agree, adding a full timer to each request is not nice. You jump over
> the actual implementation details of having just one timer in the queue
> though, it's pretty cheap to just say it can be done :-). You need to
> track each request anyways. If all drivers used the block layer tagging
> it would be easy since we are tracking each pending request in that
> case, but right now they don't. So pending requests may very well be
> outside of block layer knowledge.
Can't we handle this a bit like the Linux timer infrastructure? Instead
of a timer per cmnd we have one per queue that's reset by commands
returning? If we retained a linked list of commands in timer order and
expiry times, that's still going to save us an unsigned long and two
pointers over struct timer_list.
> You'd also end up using lots of extra cycles to find and move the timer
> when it expires (not likely) or is deleted (most likely). I'd greatly
> prefer the space overhead in this case, even if it is quite costly.
If there's another command on the linked list, you mod_timer otherwise
you del_timer_sync. Returning commands obviously delete from this list.
> There's also the issue of fiddling with just one vs many timers,
> potentially more cache bouncy.
Yes, I agree it's more fiddly.
The beauty is that I think it can all be done at the block layer via
helpers ... so it becomes Somebody Else's Problem from the SCSI point of
view ...
James
James
next prev parent reply other threads:[~2007-10-09 15:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-04 18:12 [RFC] [PATCH 0/2] blk request timeout handler patches malahal
2007-10-04 18:17 ` [RFC] [PATCH 1/2] " malahal
2007-10-04 18:52 ` Randy Dunlap
2007-10-04 20:40 ` Salyzyn, Mark
2007-10-05 12:49 ` Jens Axboe
2007-10-08 6:54 ` malahal
2007-10-08 7:04 ` Jens Axboe
2007-10-09 5:36 ` [RFC] [PATCH 1/1] " malahal
2007-10-09 9:14 ` Jens Axboe
2007-10-09 14:26 ` malahal
2007-10-09 12:00 ` Matthew Wilcox
2007-10-09 12:15 ` Jens Axboe
2007-10-09 15:56 ` James Bottomley [this message]
2007-10-09 17:23 ` malahal
2007-10-10 12:25 ` Jens Axboe
2007-10-10 16:58 ` malahal
2007-10-10 17:04 ` Jens Axboe
2007-10-11 18:01 ` malahal
2007-10-11 18:24 ` Jens Axboe
2007-10-11 18:33 ` Jens Axboe
2007-10-23 1:45 ` malahal
2007-10-23 6:30 ` malahal
2007-10-23 11:59 ` Jens Axboe
2007-10-05 12:50 ` [RFC] [PATCH 1/2] " Jens Axboe
2007-10-04 18:20 ` [RFC] [PATCH 2/2] " malahal
2007-10-04 18:32 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1191945372.3294.28.camel@localhost.localdomain \
--to=james.bottomley@steeleye.com \
--cc=jens.axboe@oracle.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).