From owner-svn-src-all@FreeBSD.ORG Mon Dec 7 17:42:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BA755106568D; Mon, 7 Dec 2009 17:42:44 +0000 (UTC) (envelope-from pjd@garage.freebsd.pl) Received: from mail.garage.freebsd.pl (chello089077043238.chello.pl [89.77.43.238]) by mx1.freebsd.org (Postfix) with ESMTP id CBF368FC1D; Mon, 7 Dec 2009 17:42:43 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id 34DD345CBA; Mon, 7 Dec 2009 18:42:42 +0100 (CET) Received: from localhost (pdawidek.wheel.pl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id E746545684; Mon, 7 Dec 2009 18:42:32 +0100 (CET) Date: Mon, 7 Dec 2009 18:42:33 +0100 From: Pawel Jakub Dawidek To: Alexander Motin Message-ID: <20091207174233.GG1688@garage.freebsd.pl> References: <200912051340.nB5DepkE089078@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="PNpeiK4tTqhYOExY" Content-Disposition: inline In-Reply-To: <200912051340.nB5DepkE089078@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT i386 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r200121 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Dec 2009 17:42:44 -0000 --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: port 0x1f0-0x1f7,0x3f6,0x170-0x177= ,0x376,0xfc00-0xfc0f at device 31.1 on pci0 ata0: on atapci0 ata0: [ITHREAD] atapci1: 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: on atapci1 ata2: [ITHREAD] ata3: on atapci1 ata3: [ITHREAD] whiplash# grep 'irq 20' /var/run/dmesg.boot atapci1: 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--