Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Dec 2009 18:42:33 +0100
From:      Pawel Jakub Dawidek <pjd@FreeBSD.org>
To:        Alexander Motin <mav@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r200121 - head/sys/dev/ata
Message-ID:  <20091207174233.GG1688@garage.freebsd.pl>
In-Reply-To: <200912051340.nB5DepkE089078@svn.freebsd.org>
References:  <200912051340.nB5DepkE089078@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--PNpeiK4tTqhYOExY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
>=20
> 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 s=
uch
>   underrun driver should just manually stop DMA engine. DMA engine should
>   same time guarantie that all bus mastering transfers completed at the m=
oment
>   of driver reads interrupt flag asserted.
>   This change should fix interrupt storms and command timeouts in many ca=
ses.
>  =20
>   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: atapc=
i1}

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,0=
xbc80-0xbc87,0xbc78-0xbc7b,0xbc60-0xbc6f mem 0xfeb00000-0xfeb003ff irq 20 a=
t 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,0=
xbc80-0xbc87,0xbc78-0xbc7b,0xbc60-0xbc6f mem 0xfeb00000-0xfeb003ff irq 20 a=
t 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=20
ata_load=3D"YES"
atapci_load=3D"YES"
atadisk_load=3D"YES"
atapicd_load=3D"YES"
ataintel_load=3D"YES"

Do you have any ideas?

> Modified:
>   head/sys/dev/ata/ata-pci.c
>=20
> Modified: head/sys/dev/ata/ata-pci.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> --- 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 =3D ATA_IDX_INB(ch, ATA_BMSTAT_PORT) & ATA_BMSTAT_MASK;
> =20
> -	if ((bmstat & (ATA_BMSTAT_ACTIVE | ATA_BMSTAT_INTERRUPT)) !=3D
> -	    ATA_BMSTAT_INTERRUPT)
> +	if ((bmstat & ATA_BMSTAT_INTERRUPT) =3D=3D 0)
>  	    return 0;
>  	ATA_IDX_OUTB(ch, ATA_BMSTAT_PORT, bmstat & ~ATA_BMSTAT_ERROR);
>  	DELAY(1);

--=20
Pawel Jakub Dawidek                       http://www.wheel.pl
pjd@FreeBSD.org                           http://www.FreeBSD.org
FreeBSD committer                         Am I Evil? Yes, I Am!

--PNpeiK4tTqhYOExY
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.4 (FreeBSD)

iD8DBQFLHT6IForvXbEpPzQRAnyqAJ9hkkwuyjUdfIvsLWgOnAovWB5h3ACdE4Ei
49G2uWnQ1PQb3v9luaOYqi4=
=SL9K
-----END PGP SIGNATURE-----

--PNpeiK4tTqhYOExY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091207174233.GG1688>