linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: Mark Lord <kernel@teksavvy.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	IDE/ATA development list <linux-ide@vger.kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: "blocked for more than 120 secs" --> a valid situation, how to prevent?
Date: Fri, 24 Sep 2010 00:41:48 -0400	[thread overview]
Message-ID: <4C9C2C0C.4070506@interlog.com> (raw)
In-Reply-To: <4C9C129E.5050504@teksavvy.com>

On 10-09-23 10:53 PM, Mark Lord wrote:
> On 10-09-23 08:05 PM, Douglas Gilbert wrote:
>> Mark,
>> If you issued the SG_IO ioctl with a timeout of at
>> least 66 minutes (expressed in milliseconds) then
>> it looks like ata_scsi_queuecmd() has a problem.
> ..
>
> Mmm.. more like blk_execute_rq() perhaps.
> That's where the wait_for_completion(&wait) call is at.
>
> Perhaps I should change it to wait in smaller increments,
> so that the lockup detection doesn't trigger on it..
>
> Doing that seems rather wasteful, though.
>
> Note that this is the ATA "SECURITY ERASE" command,
> which doesn't have an "immed" bit to toggle.
> So one must wait for it to complete.

And I have seen another issue with long (SCSI) commands.
During a FORMAT UNIT another pesky program might
have nothing better to do than periodically send out
things like TEST UNIT READY (check a disk is ready
for IO) which will have a normal timeout on it (e.g.
60 seconds). With a format underway, the HBA or the device
may not accept the TEST UNIT READY so its timeout expires
and the error handling code thinks the device is unwell
and decides to reset it.

There is a useful flag in the scsi_device structure called
no_uld_attach which hides a device from the sd driver
(assuming it is a disk). Then the disk can only be accessed
via the bsg or sg driver. And those other pesky programs
can't find the disk in question. I'm not aware of a way
to control that flag from the user space.

Doug Gilbert

  parent reply	other threads:[~2010-09-24  4:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-23 23:41 "blocked for more than 120 secs" --> a valid situation, how to prevent? Mark Lord
2010-09-24  0:05 ` Douglas Gilbert
2010-09-24  2:53   ` Mark Lord
2010-09-24  3:51     ` Mark Lord
2010-09-24  9:12       ` Jens Axboe
2010-09-24 13:51         ` [PATCH] block: Prevent hang_check firing during long I/O Mark Lord
2010-09-24 13:52           ` Jens Axboe
2010-09-24  4:41     ` Douglas Gilbert [this message]
2010-09-24  0:51 ` "blocked for more than 120 secs" --> a valid situation, how to prevent? Stan Hoeppner
2010-09-24  1:37   ` Kyle McMartin
2010-09-24  3:48     ` Stan Hoeppner
2010-09-24  5:02       ` Douglas Gilbert
2010-09-24  5:31       ` Mark Lord
2010-09-24  6:22         ` Stan Hoeppner
2010-09-24  6:30         ` hdparm-9.32 released: recommended upgrade Mark Lord
2010-09-24  1:58 ` "blocked for more than 120 secs" --> a valid situation, how to prevent? Maxim Levitsky
2010-09-24  2:08 ` Kyle McMartin

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=4C9C2C0C.4070506@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=kernel@teksavvy.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).