Re: Linux 2.5.3-pre1-aia1

Linus Torvalds (torvalds@transmeta.com)
Tue, 22 Jan 2002 08:49:49 -0800 (PST)


On Tue, 22 Jan 2002, Vojtech Pavlik wrote:
>
> That's pretty much nonsense, beg my pardon. The real correct way would
> be:
>
> issue read of 255 sectors using READ_MULTI, max_mult = 16
> receive interrupt
> inw() first 4k to buffer A
> inw() second 4k to buffer B
> don't do anything else until the next interrupt

Definitely.

There is no way the controller can even _know_ the difference between

- one large 8kB "rep insw" instruction
- two (or more) smaller chunks of "rep insw" adding up to 8kB worth of
"inw"

as long as there are no other IO instructions to that controller in
between. The two look _exactly_ the same on the bus - there aren't even
any bursting issues (you can only burst on MMIO, not PIO accesses).

Sure, there are some timing issues, but (a) data cache misses are much
bigger things than just a few instructions, and (b) we allow interrupts
from other devices anyway, so the timing _really_ isn't even an issue.

So just call "ata_input_data()" several times in a loop for discontinuous
buffers. I told Andre this before.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/