public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Kai Makisara <Kai.Makisara@kolumbus.fi>
Cc: James Bottomley <James.Bottomley@SteelEye.com>,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH RESEND 1/2] SCSI: use scsi_device->timeout consistently
Date: Tue, 21 Nov 2006 11:14:49 +0900	[thread overview]
Message-ID: <45626119.10509@gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0611202311280.6260@kai.makisara.local>

Hello,

Kai Makisara wrote:
>>> I don't think there is anything in the midlevel or low-level code to set the
>>> timeout based on the device characteristics. This is left to the ULD.
>> Low level driver should configure timeout or retries to a known value iff it
>> knows what it's doing, when it knows both transport and device-type specific
>> characteristic.
> 
> I am not so optimistic ;-)
> 
>>                 AFAICS, the only driver which modifies sdev->timeout is ipr
>> and it does so only when it knows the device is of certain type.  So, I don't
>> think it will cause any trouble, and using different initialization in
>> different ULDs is too subtle.
>>
> It does not cause trouble now but I think it is an accident waiting to 
> happen. The ULD probably knows more about the device characteristics than 
> the low-level driver. (I admit that there are other than device specific 
> aspects in setting timeouts and these should not be in ULD.)

Yeah, in general, ULD should be in charge for determining default values 
but, then again, SCSI ULDs are driving extremely wide variety of devices 
hanging off all sorts of transports these days.

> What about this variant:
> 	if (SDp->timeout < ST_TIMEOUT)
> 		SDp->timeout = ST_TIMEOUT;
> 
> It does guarantee that the timeout is long enough for tape drives. It also 
> lets the low-level driver set a longer timeout if it has some reason to 
> make it longer than the ULD does.

I don't know enough about tape devices to determine what's right here. 
I think it's better for me to leave st and osst to people who know 
better.  I'll re-submit without os and osst changes.

Thanks.

-- 
tejun

      reply	other threads:[~2006-11-21  2:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-19 12:51 [PATCH RESEND 1/2] SCSI: use scsi_device->timeout consistently Tejun Heo
2006-11-19 12:52 ` [PATCH RESEND 2/2] SCSI: add scsi_device->retries Tejun Heo
2006-11-19 22:32   ` Kai Makisara
2006-11-19 23:31     ` Tejun Heo
2006-11-20 21:42       ` Kai Makisara
2006-11-19 22:01 ` [PATCH RESEND 1/2] SCSI: use scsi_device->timeout consistently Kai Makisara
2006-11-19 23:26   ` Tejun Heo
2006-11-20 21:25     ` Kai Makisara
2006-11-21  2:14       ` Tejun Heo [this message]

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=45626119.10509@gmail.com \
    --to=htejun@gmail.com \
    --cc=James.Bottomley@SteelEye.com \
    --cc=Kai.Makisara@kolumbus.fi \
    --cc=linux-scsi@vger.kernel.org \
    /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