Subject: Re: lack of pciide transfer alignment checking causes crash
To: Jason Thorpe <thorpej@shagadelic.org>
From: Erik E. Fair <fair@netbsd.org>
List: tech-kern
Date: 07/05/2005 23:07:49
Thanks for those changes, Jason.

One more thing about this: I intend to document this work-around for the
chip/core's bad behavior in geodeide(4). It should probably be put in ata(4)
also, too, since the backoff to PIO is now generic to that code.

However, it has been suggested that if results in bad performance of user mode
programs using the raw device with misaligned buffers, the kernel ought to
uprintf() about it, at least once per program invocation.

I was thinking in terms of instrumentation: count ATA/ATAPI PIOs, DMAs, UDMAs,
and make the data available to those curious enough to go looking.

If a user mode program is tickling a kernel workaround for a hardware bug,
how loudly should the kernel complain about it?

One example: the NetBSD/alpha kernel will uprintf() about unaligned accesses
from the user mode programs that the kernel "fixes up" behind the program's
back (so to speak), e.g. PR bin/21718

Put more directly, should we add a uprintf() about the backoff to PIO in the
geodeide.c DMA init, or in the ata_wdc code?

	Erik <fair@netbsd.org>