Re: Generic PCI IDE bus-mastering DMA support

mlord (mlord@pobox.com)
Fri, 19 Sep 1997 09:59:42 -0400


Zlatko Calusic wrote:
...
>
> After running some benchmarks I noticed that performance is slighly
> better when reading from disk, but worse when writing to disk (??).
> Benchmark results are available on request (I will make some more,
> just to be sure).
>
> I have been warned that DMA is not the magic solution (SCSI *is* :) ),
> but friend of mine has opinion that it should cut CPU usage to half!?!

IDE drives using DMA have nearly all of the same performance advantages
as SCSI, except perhaps that you have to manually enable some of them
using hdparm.

The writes are somewhat performance-skewed because they normally
lack anything equivalent to the "read-ahead" boost that reads receive
(that is an "on-drive" read-ahead, not the filesystem read-ahead).

To boost your write performance to similar high levels,
cautiously use this:

## turns on IDE write caching
hdparm -W1 /dev/hd[a-d]

Note that on some drives this does more than a simple "write-behind"
caching scheme -- it also permits out-of-order queuing/execution
of read/write commands, ala SCSI (a more formal specification for queued
I/O with IDE is being experimented with in the latest standards).

It is a HIGHLY RECOMMENDED practice to turn it off again during
shutdown,
by using something like:

## turns off IDE write caching
hdparm -W0 /dev/hd[a-d]

Tuck that command into /etc/rc.d/init.d/halt or /etc/rc.d/rc.0

Once you folks agree on the stability of these patches,
we'll work on incorporating them into the stock kernel.

I first need to hear back from VIA VP-1 chipset users though..

-ml
the Linux IDE guy