Re: [PATCH] speed up SATA

Jeff Garzik
2004-03-29T19:46:22Z

Andrea Arcangeli wrote:
> Once you change the API too, then you can set the hardwre limit in your
> driver and relay on the highlevel blkdev code to find the optimal runtime
> dma size for bulk I/O, but today it's your driver that is enforcing a
> runtime bulk dma size, not the maximim limit of the controller, and so
> you should code your patch accordingly.

This magic 512k or 1M limit has nothing to do with SATA. It's a magic
number whose definition is "we don't want PATA or SATA or SCSI disks
doing larger requests than this for latency, VM, and similar reasons."

That definition belongs outside the low-level SATA driver.

This 512k/1M value is sure to change over time, which involves
needlessly plugging the same value into multiple places. And when such
changes occurs, you must be careful not to exceed hardware- and
errata-based limits -- of which there is no distinction in the code.

I think the length of this discussion alone clearly implies that the
low-level driver should not be responsible for selecting this value, if
nothing else ;-)

Jeff