linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: Ric Wheeler <ric@emc.com>,
	linux-ide@vger.kernel.org, Mark Lord <mlord@pobox.com>,
	Jens Axboe <axboe@suse.de>
Subject: Re: [RFT] major libata update
Date: Wed, 17 May 2006 00:24:48 +0900	[thread overview]
Message-ID: <4469EEC0.4060907@gmail.com> (raw)
In-Reply-To: <4469E0DB.1040709@garzik.org>

[-- Attachment #1: Type: text/plain, Size: 2844 bytes --]

Jeff Garzik wrote:
> Ric Wheeler wrote:
>>
>> Jeff Garzik wrote:
>>
>>> TESTING:
>>> * Although most drivers by count received few operational changes, the
>>> common probe path was updated, so all drivers need fresh "yes, it sees
>>> all my disks" regression testing.
>>>
>>> * ahci and sata_sil24 were touched a lot, and so need additional
>>> testing.
>>>
>>> * sata_sil and ata_piix also need healthy re-testing of all basic
>>> functionality.
>>>
>>>
>>>  
>>>
>> I have been running a moderate write workload on this (built using 
>> linux-2.6.17-rc4 with your patch applied on top).  Last night, I ran 
>> on a set of clean AHCI based boxes (no bad drives) and got a serious 
>> of occasional spurious interrupts logged:
>>
>>
>> May 15 21:24:38 centera kernel: ReiserFS: sdd14: Using r5 hash to sort 
>> names
>> May 15 21:52:44 centera kernel: ata1: spurious interrupt (irq_stat 0x8 
>> active_tag -84148995 sactive 0x800)
>> May 15 22:00:02 centera run-crons[26837]: logrotate returned 1
>> May 15 22:16:00 centera kernel: ata1: spurious interrupt (irq_stat 0x8 
>> active_tag -84148995 sactive 0x4)
>> May 15 22:29:14 centera kernel: ata1: spurious interrupt (irq_stat 0x8 
>> active_tag -84148995 sactive 0x7e007fff)
>> May 15 22:35:04 centera kernel: ata3: spurious interrupt (irq_stat 0x8 
>> active_tag -84148995 sactive 0x4fffffff)
>>
>> Full messages file and lspci below, but note that this hardware has 
>> been running ahci with this config in production for over a year now.
> 
> Definitely new behavior.  In each case you have irq_stat == 0x8, which 
> indicates a Set Device Bits FIS has been received.
> 

Yeap, new behavior.  Though, one thing to note is that the original 
ahci_host_intr() never bothered to report spurious interrupt.  It always 
returned 1 telling ahci_interrupt() that the interrupt is handled.  But 
as this is SDB instead of D2H, my guess is that the drive is sending 
spurious NCQ completions with no new command completed.

Hmm.. Can you try the attached patch and report what the kernel says?

The message reminds me of several things...

* can we make tags int and use -1 for invalid tag?  ATA_TAG_POISON looks 
horrible when printed.

* it would be nice to have some framework to determine whether the 
controller is receiving too many consecutive spurious interrupts.  Say, 
32 irqs in a row without intervening valid interrupts is a good reason 
to be suspicious about stuck IRQ.  Freezing & resetting will resolve the 
situation in most cases.

* With NCQ, some drives generate spurious D2H FISes with I bit set as if 
it were executing non-NCQ commands.  So, regardless of controller, we're 
likely to see similar problems (but sil24 does all the protocol handling 
and ignores such FISes by itself).  This can be combined with the above 
freeze on too many spurious, I guess.

-- 
tejun

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 772 bytes --]

diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c
index 45fd71d..506f0df 100644
--- a/drivers/scsi/ahci.c
+++ b/drivers/scsi/ahci.c
@@ -916,10 +916,19 @@ static void ahci_host_intr(struct ata_po
 			return;
 	}
 
-	if (ata_ratelimit())
+	if (ata_ratelimit()) {
 		ata_port_printk(ap, KERN_INFO, "spurious interrupt "
 				"(irq_stat 0x%x active_tag %d sactive 0x%x)\n",
 				status, ap->active_tag, ap->sactive);
+		if (status & PORT_IRQ_SDB_FIS) {
+			struct ahci_port_priv *pp = ap->private_data;
+			u32 *sdb_fis = pp->rx_fis + 0x58;
+
+			ata_port_printk(ap, KERN_INFO, "spurious SDB FIS "
+				"%08x:%08x ap->qc_active=%08x qc_active=%08x\n",
+				sdb_fis[0], sdb_fis[1], ap->qc_active, qc_active);
+		}
+	}
 }
 
 static void ahci_irq_clear(struct ata_port *ap)

  reply	other threads:[~2006-05-16 15:24 UTC|newest]

Thread overview: 115+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-15 17:00 [RFT] major libata update Jeff Garzik
2006-05-15 17:18 ` Andrew Morton
2006-05-15 18:06   ` Jeff Garzik
2006-05-15 19:06     ` Arkadiusz Miskiewicz
2006-05-15 20:45       ` Jeff Garzik
2006-05-15 19:33     ` Mark Lord
2006-05-15 22:52       ` Tejun Heo
2006-05-15 18:15   ` Jeff Garzik
2006-05-15 18:27     ` Andrew Morton
2006-05-15 18:44       ` Jeff Garzik
2006-05-15 18:37     ` Alan Cox
2006-05-15 17:19 ` Alan Cox
2006-05-15 17:13   ` Jeff Garzik
2006-05-15 18:29 ` Tomasz Torcz
2006-05-15 18:43   ` Jeff Garzik
2006-05-15 23:32     ` Tejun Heo
2006-05-15 23:49       ` Jeff Garzik
2006-05-16  0:04         ` Tejun Heo
2006-05-16  2:15           ` Tejun Heo
2006-05-15 19:15 ` Jeff Garzik
2006-05-15 23:02 ` Wakko Warner
2006-05-15 23:00   ` Jeff Garzik
2006-05-15 23:13     ` Wakko Warner
2006-05-15 23:19       ` Jeff Garzik
2006-05-15 23:40     ` Alan Cox
2006-05-15 23:50       ` Wakko Warner
2006-05-15 23:38   ` Alan Cox
2006-05-15 23:47     ` Wakko Warner
2006-05-15 23:45       ` Jeff Garzik
2006-05-15 23:30 ` Avuton Olrich
2006-05-15 23:36   ` Tejun Heo
2006-05-15 23:54   ` Jeff Garzik
2006-05-16  0:08     ` Avuton Olrich
2006-05-16  3:36     ` Avuton Olrich
2006-05-16  3:51       ` Jeff Garzik
2006-05-16  4:33         ` Avuton Olrich
2006-05-16 14:57           ` Linus Torvalds
2006-05-17 15:25             ` OGAWA Hirofumi
2006-05-17 23:40               ` Linus Torvalds
2006-05-17 23:48                 ` Jeff Garzik
2006-05-18  1:48                   ` Alan Cox
2006-05-17 23:49                 ` Linus Torvalds
2006-05-16 15:02           ` Jeff Garzik
2006-05-16  3:55       ` Tejun Heo
2006-05-16  4:37         ` Avuton Olrich
2006-05-16 11:36 ` Ric Wheeler
2006-05-16 14:25   ` Jeff Garzik
2006-05-16 15:24     ` Tejun Heo [this message]
2006-05-16 18:29       ` Ric Wheeler
2006-05-16 21:41         ` Ric Wheeler
2006-05-16 22:02           ` Jeff Garzik
2006-05-16 23:11             ` Eric D. Mudama
2006-05-17  2:13               ` Ric Wheeler
2006-05-16 23:23             ` Tejun Heo
2006-05-17  2:09               ` Ric Wheeler
2006-05-16 23:44         ` Tejun Heo
2006-05-16 23:53           ` Jeff Garzik
2006-05-17  0:00             ` Jeff Garzik
2006-05-17  0:29               ` Tejun Heo
2006-05-17  1:08                 ` Jeff Garzik
2006-05-17  1:27                   ` Tejun Heo
2006-05-17  2:26                     ` Jeff Garzik
2006-05-17  3:05                       ` Tejun Heo
2006-05-22  7:19                     ` Jeff Garzik
2006-05-23 13:59                       ` Tejun Heo
2006-05-17  0:31               ` Jeff Garzik
2006-05-17  0:50                 ` Tejun Heo
2006-05-17  0:57                   ` Tejun Heo
2006-05-17  2:22                     ` Ric Wheeler
2006-05-17  1:37                       ` Tejun Heo
2006-05-17  3:57                         ` Ric Wheeler
2006-05-17  4:44                           ` Tejun Heo
2006-05-17 11:30                             ` Ric Wheeler
2006-05-17 20:45                             ` Ric Wheeler
2006-05-17 21:01                             ` Mark Lord
2006-05-17 21:04                               ` Jeff Garzik
2006-05-17 21:50                                 ` Tejun Heo
2006-05-17 21:56                                   ` Mark Lord
2006-05-17 22:00                                     ` Jeff Garzik
2006-05-17 22:03                                       ` Mark Lord
2006-05-17 22:13                                         ` Jeff Garzik
2006-05-18  3:33                                     ` Ric Wheeler
2006-05-18  3:26                                       ` Tejun Heo
2006-05-18 11:58                                         ` Ric Wheeler
2006-05-18 12:52                                           ` Mark Lord
2006-05-18 13:22                                             ` Ric Wheeler
2006-05-18 13:37                                               ` Jens Axboe
2006-05-17  1:13                   ` Jeff Garzik
2006-05-17  1:14                   ` Jeff Garzik
2006-05-17  2:16           ` Ric Wheeler
2006-05-16 23:34       ` Jeff Garzik
2006-05-16 23:53         ` Tejun Heo
2006-05-17  2:05 ` Andrew Morton
2006-05-17  4:49   ` Tejun Heo
2006-05-17  4:56     ` Andrew Morton
2006-05-17  5:14       ` Tejun Heo
2006-05-17  6:35         ` Tejun Heo
2006-05-18 11:24           ` Albert Lee
2006-05-18 11:33             ` Tejun Heo
2006-05-19 10:37               ` Albert Lee
2006-05-19 11:03                 ` Tejun Heo
2006-05-22  3:51                   ` [PATCH 1/1] libata: use polling pio for identify device Albert Lee
2006-05-22  6:24                     ` Jeff Garzik
2006-05-23  2:27                       ` Albert Lee
2006-05-18 23:07           ` [RFT] major libata update Andrew Morton
2006-05-19  1:14             ` Tejun Heo
2006-05-19  2:06               ` Jeff Garzik
2006-05-19  2:16                 ` Tejun Heo
2006-05-22  7:22           ` Jeff Garzik
2006-05-21 23:51 ` Michael Sterrett -Mr. Bones.-
2006-05-22  2:42   ` Tejun Heo
2006-05-22  3:42     ` Michael Sterrett -Mr. Bones.-
2006-05-22  6:23     ` Michael Sterrett -Mr. Bones.-
  -- strict thread matches above, loose matches on Subject: below --
2006-05-17  7:35 Matthieu CASTET
2006-05-18  0:36 Brown, Len

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=4469EEC0.4060907@gmail.com \
    --to=htejun@gmail.com \
    --cc=axboe@suse.de \
    --cc=jeff@garzik.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=mlord@pobox.com \
    --cc=ric@emc.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 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).