Re: [PATCH] speed up SATA

From: Jeff Garzik
Date: Mon Mar 29 2004 - 14:49:28 EST


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



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