All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Wilcox <matthew@wil.cx>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: malahal@us.ibm.com, linux-scsi@vger.kernel.org,
	Kristen Carlson Accardi <kristen.c.accardi@intel.com>,
	sarah.a.sharp@intel.com
Subject: Another use for block-layer timeouts
Date: Wed, 5 Dec 2007 14:06:23 -0700	[thread overview]
Message-ID: <20071205210623.GB27526@parisc-linux.org> (raw)
In-Reply-To: <20071107132256.GG5525@kernel.dk>

On Wed, Nov 07, 2007 at 02:22:57PM +0100, Jens Axboe wrote:
> On Tue, Nov 06 2007, malahal@us.ibm.com wrote:
> > gdth driver is modified NOT to use scp->eh_timeout. Now, it has
> > eh_timed_out (gdth_timed_out) to handle command timeouts for locked
> > I/O's. Have not tested as I don't have needed hardware! Patch is
> > against 2.6.23-mm1.
> 
> I updated the timeout patch to current kernel and fixed some fallout. I
> included your gdth patch.
> 
> Completely untested, patch is below. It's also in the #timeout branch of
> the block git repo, to keep track of it.

Hi Jens,

Kristen, Sarah and I were talking over lunch today, and discovered that
they each have a problem that I think can be solved by using the block
layer timeout functionality.  One problem is a software-controlled drive
activity LED.  The other is wanting to save power by suspending the link
to an idle USB Storage device.

What these both have in common is the desire to find out when the queue
is empty (with a bit of hysteresis to avoid flickering the LED off for
too long, or powering down the USB link when there's a command about
to arrive).

I think this could be done with the timer you're adding here, by adding
a driver callback to be called once the timer fires and there's no
commands in the queue.  Alternatively, we could add another timer.
While each driver could have its own timer to detect these cases, if
we have two drivers that want this information, chances are there are
others that could also make use of it.

What do you think?  Shall I try knocking up a patch to (ab)use the timer
in this way?

-- 
Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours.  We can't possibly take such
a retrograde step."

  parent reply	other threads:[~2007-12-05 21:06 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-06  6:54 [PATCH] gdth: scp timeout clean up malahal
2007-11-06  7:54 ` Boaz Harrosh
2007-11-06 16:18   ` malahal
2007-11-06 22:34   ` [PATCH] gdth: scp timeout clean up (try #2) malahal
2007-11-07 13:22     ` Jens Axboe
2007-11-14  2:39       ` malahal
2007-12-03  1:53         ` [PATCH] blk request timeout minor fixes malahal
2007-12-03  2:49           ` Matthew Wilcox
2007-12-03 23:47             ` malahal
2007-12-04  9:00               ` Jens Axboe
2007-12-05 20:05                 ` malahal
2007-12-05 20:10                   ` Jens Axboe
2007-12-05 20:40                     ` malahal
2007-12-05 21:06       ` Matthew Wilcox [this message]
2007-11-07 17:35     ` [PATCH] gdth: scp timeout clean up (try #2) Christoph Hellwig

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=20071205210623.GB27526@parisc-linux.org \
    --to=matthew@wil.cx \
    --cc=jens.axboe@oracle.com \
    --cc=kristen.c.accardi@intel.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=malahal@us.ibm.com \
    --cc=sarah.a.sharp@intel.com \
    /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 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.