svn commit: r200121 - head/sys/dev/ata

Pawel Jakub Dawidek pjd at FreeBSD.org
Mon Dec 7 17:42:44 UTC 2009


On Sat, Dec 05, 2009 at 01:40:51PM +0000, Alexander Motin wrote:
> Author: mav
> Date: Sat Dec  5 13:40:51 2009
> New Revision: 200121
> URL: http://svn.freebsd.org/changeset/base/200121
> 
> Log:
>   Do not ignore device interrupt if bus mastering is still active. It is
>   normal in case of media read error and some ATAPI cases, when transfer size
>   is unknown beforehand. PCI ATA BM specification tells that in case of such
>   underrun driver should just manually stop DMA engine. DMA engine should
>   same time guarantie that all bus mastering transfers completed at the moment
>   of driver reads interrupt flag asserted.
>   This change should fix interrupt storms and command timeouts in many cases.
>   
>   PR:		kern/103602, sparc64/121539, kern/133122, kern/139654

I've a box where I see interrupt storm on. This is 8-STABLE with this
patch applied.

whiplash# vmstat -i | grep atapci1
irq20: atapci1                  17935084     163046

whiplash# top -SH | grep atapci1
   12 root     -64    -     0K   224K WAIT    0   1:07 71.19% {irq20: atapci1}

The box is totally idle. gstat(8) reports no disk activity whatsoever.

whiplash# grep ^ata /var/run/dmesg.boot
atapci0: <Intel ICH7 UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xfc00-0xfc0f at device 31.1 on pci0
ata0: <ATA channel 0> on atapci0
ata0: [ITHREAD]
atapci1: <Intel ICH7 SATA300 controller> port 0xbc98-0xbc9f,0xbc90-0xbc93,0xbc80-0xbc87,0xbc78-0xbc7b,0xbc60-0xbc6f mem 0xfeb00000-0xfeb003ff irq 20 at device 31.2 on pci0
atapci1: [ITHREAD]
ata2: <ATA channel 0> on atapci1
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci1
ata3: [ITHREAD]

whiplash# grep 'irq 20' /var/run/dmesg.boot
atapci1: <Intel ICH7 SATA300 controller> port 0xbc98-0xbc9f,0xbc90-0xbc93,0xbc80-0xbc87,0xbc78-0xbc7b,0xbc60-0xbc6f mem 0xfeb00000-0xfeb003ff irq 20 at device 31.2 on pci0

I'm not sure if this is relevant, but I load entire ATA from modules:
whiplash# grep ^ata /boot/loader.conf 
ata_load="YES"
atapci_load="YES"
atadisk_load="YES"
atapicd_load="YES"
ataintel_load="YES"

Do you have any ideas?

> Modified:
>   head/sys/dev/ata/ata-pci.c
> 
> Modified: head/sys/dev/ata/ata-pci.c
> ==============================================================================
> --- head/sys/dev/ata/ata-pci.c	Sat Dec  5 13:12:04 2009	(r200120)
> +++ head/sys/dev/ata/ata-pci.c	Sat Dec  5 13:40:51 2009	(r200121)
> @@ -462,8 +462,7 @@ ata_pci_status(device_t dev)
>  	 (ch->dma.flags & ATA_DMA_ACTIVE))) {
>  	int bmstat = ATA_IDX_INB(ch, ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
>  
> -	if ((bmstat & (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) !=
> -	    ATA_BMSTAT_INTERRUPT)
> +	if ((bmstat & ATA_BMSTAT_INTERRUPT) == 0)
>  	    return 0;
>  	ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, bmstat & ~ATA_BMSTAT_ERROR);
>  	DELAY(1);

-- 
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd at FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-head/attachments/20091207/8b24c9e7/attachment.pgp


More information about the svn-src-head mailing list