Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  2 Jan 2003 16:29:51 -0500
From:      Bruce Campbell <bruce@engmail.uwaterloo.ca>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        freebsd-hardware@FreeBSD.ORG, freebsd-questions@FreeBSD.ORG
Subject:   Re: Followup to "fallback to PIO mode" on dual processor AMD systems
Message-ID:  <1041542991.3e14af4fc3d65@www.nexusmail.uwaterloo.ca>
In-Reply-To: <20030103062516.F755-100000@gamplex.bde.org>
References:  <20030103062516.F755-100000@gamplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Bruce Evans <bde@zeta.org.au>:
> 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




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