On Sat, Apr 03, 2004 at 06:51:32PM +0000, Wayne Stallwood wrote:
Will DMA still be an issue if the drive is seen as a scsi drive via ide-scsi (sorry, now gone past the limits of my knowledge here)? Does scsi use DMA?
SCSI doesn't use DMA, but the IDE interface bit of ide-scsi should. I'm not quite sure how this works in the real world, because how do you enable DMA on an IDE drive that doesn't exist.
The ide device still exists so you can enable and disable DMA etc. etc. the drive itself isn't now talking SCSI just programs will talk to the devices as if they are SCSI and the kernel will translate it to IDE.
I have just done a quick test with a cat /dev/scd0 > /tmp/tmp.iso (scd0 is my IDE Pioneer 106 dvdburner using the ide-scsi interface) to copy the contents of a 455 MegaByte CD to an iso image the first time without dma and the second with dma (set using hdparm /dev/hdd in the normal manner).
The (very) unscientific results of this showed that whichever way I tried this the job took the same amount of real time in seconds to complete (around 2m19s) (this I presume is that even without using dma the dvdburner can shunt more than enough data over the IDE bus), the difference was that when I wasn't using dma the amount of cpu usage as system (according to top) was pegged at around 60-70% of cpu with the idle time at about 40-30% and a load average of around 0.89 and when using dma the system time dropped to under 5% with an idle time of about 95% and a load average of 0.60ish. This is on an athlon 1700+ machine and a via kt400 motherboard chipset with everything connected up nicely with the best type of cables etc. etc.
So, my conclusion would be that if you don't use dma on an IDE device then your machine will use much more cpu when accessing those devices than if it wasn't, and seeing as that is why IDE devices have dma that seems perfectly sensible to me :)
Adam