From: Tejun Heo <htejun@gmail.com>
To: Robert Hancock <hancockr@shaw.ca>
Cc: Andrew Morton <akpm@linux-foundation.org>,
enricoss@tiscali.it, linux-kernel@vger.kernel.org,
linux-ide@vger.kernel.org, Jeff Garzik <jeff@garzik.org>
Subject: Re: hsm violation
Date: Mon, 25 Jun 2007 11:12:37 +0900 [thread overview]
Message-ID: <467F2495.3080509@gmail.com> (raw)
In-Reply-To: <467EC909.9040006@shaw.ca>
Robert Hancock wrote:
> Andrew Morton wrote:
>> On Sun, 24 Jun 2007 14:32:22 +0200 Enrico Sardi <enricoss@tiscali.it>
>> wrote:
>>> [ 61.176000] ata1.00: exception Emask 0x2 SAct 0x2 SErr 0x0 action
>>> 0x2 frozen
>>> [ 61.176000] ata1.00: (spurious completions during NCQ issue=0x0
>>> SAct=0x2 FIS=005040a1:00000004)
>>
>> It's not obvious (to me) whether this is a driver bug, a hardware bug,
>> expected-normal-behaviour or what - those diagnostics (which we get to
>> see distressingly frequently) are pretty obscure.
>
> The spurious completions during NCQ error is indicating that the drive
> has indicated it's completed NCQ command tags which weren't outstanding.
> It's normally a result of a bad NCQ implementation on the drive.
> Technically we can live with it, but it's rather dangerous (if it
> indicates completions for non-outstanding commands, how do we know it
> doesn't indicate completions for actually outstanding commands that
> aren't actually completed yet..)
There is a small race window there. Please consider the following sequence.
1. drive sends SDB FIS with spurious completion in it.
2. block layer issues new r/w command to the drive. SDB FIS is still in
flight.
3. ata driver issues the command (the pending bit is set prior to
transmitting command FIS).
4. controller completes receiving FIS from #1. Driver reads the mask
and completes all indicated commands. If spurious completion in #1
happens to match the slot allocated in #3, the driver just completed a
command which hasn't been issued to the drive yet.
So, it actually is dangerous. We might even be seeing the real
completion as spurious one (as the command is completed prematurely).
It seems all those HTS541* drives share this problem. Four of them are
already on the blacklist and the other OS reportedly blacklists three of
them too. I'll submit a patch to add HTS541616J9SA00.
Thanks.
--
tejun
next prev parent reply other threads:[~2007-06-25 2:12 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <fa.sspu6LOivd/touNtS2IsMKPqHa0@ifi.uio.no>
[not found] ` <fa.19XJG1Asdp1zwcWLxolIH6F+5lY@ifi.uio.no>
2007-06-24 19:42 ` hsm violation Robert Hancock
2007-06-25 2:12 ` Tejun Heo [this message]
2007-06-25 2:28 ` [PATCH 2.6.22-rc5] libata: add HTS541616J9SA00 to NCQ blacklist Tejun Heo
2007-06-25 2:39 ` Robert Hancock
2007-06-25 2:49 ` Tejun Heo
2007-06-25 3:47 ` Petr Vandrovec
2007-06-25 4:05 ` Tejun Heo
2007-06-25 4:10 ` Robert Hancock
2007-06-25 4:22 ` Petr Vandrovec
2007-06-25 4:29 ` Tejun Heo
2007-07-02 7:12 ` Tejun Heo
2007-07-02 14:14 ` Jeff Garzik
[not found] <467E6456.4030503@tiscali.it>
2007-06-24 19:30 ` hsm violation Andrew Morton
2007-06-25 2:15 ` Tejun Heo
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=467F2495.3080509@gmail.com \
--to=htejun@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=enricoss@tiscali.it \
--cc=hancockr@shaw.ca \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@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).