public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Bill Davidsen <davidsen@tmr.com>
Cc: Harald Dunkel <harald.dunkel@t-online.de>,
	Pavel Machek <pavel@ucw.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: 2.6.18-rc2, problem to wake up spinned down drive?
Date: Wed, 09 Aug 2006 03:59:13 +0900	[thread overview]
Message-ID: <44D8DF01.1090303@gmail.com> (raw)
In-Reply-To: <44D8DA8F.4040804@tmr.com>

Bill Davidsen wrote:
>> I think the solution to your problem is adjusting command timeout to 
>> more reasonable values which should make the problem more bearable. 
>> It'll take some time to figure out how to make timeouts more 
>> intelligent without breaking support for slow devices.  I'll work on 
>> that. 
> 
> Tejun, would it be possible and sensible to either let the user tune 
> this per-drive, or to have the kernel note how long {something} takes 
> and auto-tune to that? As you said, the issue is not breaking slow devices.

I think the driver can be made to have sufficient static intelligence to 
not require user or auto tuning.  !BUSY wait in pre/postreset which are 
often cause of unnecessary 30s delay during recovery can be avoided by...

1. for !hotplug, waiting for BSY before reset doesn't make sense in the 
first place (why would we be resetting the device if it can clear BSY?)

2. for hotplug, we can make things much more intelligent.  e.g. try 
prereset waiting and softreset from 0-5s, then hardresets 5-10s, 10-15s, 
15-30s and 30s-60s, which will guarantee 1. slow device is given full 
idle 30s to get ready eventually  2. recovery reset is complete in 60s, 
while giving fast devices several chances to be fast.

And, for IO command timeouts, some operating system is said to use 7s 
timeout for ATA IO commands and simply adopting that value would be good 
enough.  We also can choose more agressive timeouts for some EH commands 
(IDNTIFY, SET_FEATURES...).

With all above combined, EH recovery should be pretty snappy and 
recovery time well-bound.

-- 
tejun

  reply	other threads:[~2006-08-08 18:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-30 12:01 2.6.18-rc2, problem to wake up spinned down drive? Harald Dunkel
2006-07-30 12:22 ` Johannes Weiner
2006-07-30 12:57   ` Harald Dunkel
2006-08-01 16:16 ` Tejun Heo
2006-08-01 18:14   ` Harald Dunkel
2006-08-01 18:23     ` Tejun Heo
2006-08-02 16:56       ` Bill Davidsen
2006-08-05 19:32       ` Harald Dunkel
2006-08-05 21:23   ` Pavel Machek
2006-08-07  3:07     ` Tejun Heo
2006-08-07 18:43       ` Harald Dunkel
2006-08-07 19:26         ` Tejun Heo
2006-08-08 18:40           ` Bill Davidsen
2006-08-08 18:59             ` Tejun Heo [this message]
2006-08-02 10:18 ` Pavel Machek
2006-08-03  5:44   ` Harald Dunkel

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=44D8DF01.1090303@gmail.com \
    --to=htejun@gmail.com \
    --cc=davidsen@tmr.com \
    --cc=harald.dunkel@t-online.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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