From owner-freebsd-questions Thu Jan 2 13:31:20 2003 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78AB337B401; Thu, 2 Jan 2003 13:31:17 -0800 (PST) Received: from level.uwaterloo.ca (level.uwaterloo.ca [129.97.50.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id BB1D443EA9; Thu, 2 Jan 2003 13:31:16 -0800 (PST) (envelope-from bruce@engmail.uwaterloo.ca) Received: from level.uwaterloo.ca (localhost [127.0.0.1]) by level.uwaterloo.ca (8.12.3/8.12.3) with ESMTP id h02LTq5n075524; Thu, 2 Jan 2003 16:29:52 -0500 (EST) (envelope-from bruce@engmail.uwaterloo.ca) Received: (from www@localhost) by level.uwaterloo.ca (8.12.3/8.12.3/Submit) id h02LTppi075523; Thu, 2 Jan 2003 16:29:51 -0500 (EST) X-Authentication-Warning: level.uwaterloo.ca: www set sender to bruce@engmail.uwaterloo.ca using -f Received: from 129.97.50.50 ( [129.97.50.50]) as user bruce@engmail.uwaterloo.ca by www.nexusmail.uwaterloo.ca with HTTP; Thu, 2 Jan 2003 16:29:51 -0500 Message-ID: <1041542991.3e14af4fc3d65@www.nexusmail.uwaterloo.ca> Date: Thu, 2 Jan 2003 16:29:51 -0500 From: Bruce Campbell To: Bruce Evans Cc: freebsd-hardware@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG Subject: Re: Followup to "fallback to PIO mode" on dual processor AMD systems References: <20030103062516.F755-100000@gamplex.bde.org> In-Reply-To: <20030103062516.F755-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.1 / FreeBSD-4.6.2 X-Originating-IP: 129.97.50.50 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Quoting Bruce Evans : > On Thu, 2 Jan 2003, Bruce Campbell wrote: > > > At present, I don't suspect bad media because the error message is > > "WRITE command timeout tag=0 serv=0" which doesn't suggest a specific > > sector/track etc, and running with UDMA33 instead of UDMA100 makes the > problem > > appear to vanish. > > The fallback is clearly wrong because it turns isolated media errors > into pessimized i/o for the whole disk at best, system hangs during > resets next best, and system crashes at worst. I keep a disk with bad > media on line for testing some of this, and zap the fallback using the > following patch (hope this is complete; it was edited from a larger > patch). Thanks for the patch. Under moderate load, I am seeing occasional instances of: /kernel: ad0: WRITE command timeout tag=0 serv=0 - resetting /kernel: ata0: resetting devices .. done and everything keeps on working normally via DMA. ie it does not drop to PIO. The more manacing case is this: Dec 30 23:26:59 /kernel: ad0: WRITE command timeout tag=0 serv=0 - resetting Dec 30 23:26:59 /kernel: ata0: resetting devices .. done Dec 30 23:26:59 /kernel: ad0: WRITE command timeout tag=0 serv=0 - resetting Dec 30 23:27:00 /kernel: ata0: resetting devices .. done Dec 30 23:27:00 /kernel: ad0: WRITE command timeout tag=0 serv=0 - resetting Dec 30 23:27:00 /kernel: ata0: resetting devices .. done Dec 30 23:27:00 /kernel: ad0: WRITE command timeout tag=0 serv=0 - resetting Dec 30 23:27:00 /kernel: ad0: timeout waiting for cmd=ef s=d0 e=00 Dec 30 23:27:00 /kernel: ad0: trying fallback to PIO mode Dec 30 23:27:00 /kernel: ata0: resetting devices .. done So it appears it would no longer with DMA, but it would work with PIO. If it is manually set back to UDMA with the atacontrol command, it times out again, and falls back to PIO. However, a soft reboot, and all is well again. > > %%% > Index: ata-disk.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/ata/ata-disk.c,v > retrieving revision 1.139 > diff -u -2 -r1.139 ata-disk.c > --- ata-disk.c 17 Dec 2002 16:26:22 -0000 1.139 > +++ ata-disk.c 18 Dec 2002 01:03:37 -0000 > @@ -597,5 +606,5 @@ > else { > ata_dmainit(adp->device, ata_pmode(adp->device->param), -1, -1); > - printf(" falling back to PIO mode\n"); > + printf(" NOT falling back to PIO mode\n"); > } > TAILQ_INSERT_HEAD(&adp->device->channel->ata_queue, request, chain); > @@ -603,4 +612,5 @@ > } > > +#if 0 > /* if using DMA, try once again in PIO mode */ > if (request->flags & ADR_F_DMA_USED) { > @@ -613,4 +623,5 @@ > return ATA_OP_FINISHED; > } > +#endif > > request->flags |= ADR_F_ERROR; > %%% > > Bruce > -- Bruce Campbell Engineering Computing CPH-2374B University of Waterloo (519)888-4567 ext 5889 ---------------------------------------- This mail sent through www.mywaterloo.ca To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message