DMA / UDMA where to start?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Pyr0Mathic

DMA / UDMA where to start?

Post by Pyr0Mathic »

Hi all,

i am currently working on improving the speed of my operating system. Currently it is simply to slow.

Small background on what i am doing:
-Ftp server for P3 500, whit at least 64MB ram.
-2x, 200 gig, or so, hdd
-4x Realtek 8139, 100MBit, so total of 40MB\s ( dont know if that is possible, but whitout udma it sertainly isnt)

But thusfar i did all my R/W from hdd whit direct IO commands so PIO mode. but this seems to me to be very slow.

So i want to support ATA 33/66/100/133 etc all those modes, or at least a couple of them, but where do i start. And also if i would need to write direct to Pci device's directly. is there a basic set of instructions which is supported by all the hardware, or is it bounded to a chipset, manufacturer. So would i be required to build several drivers for several chip-sets out there.

So basicly the question is where do i start, and how can i make it as universal as possible. Cause the only thing i really need to do is Read or Write a sector to or from the Hdd...

Regards.
PyroMathic
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re:DMA / UDMA where to start?

Post by Solar »

Every good solution is obvious once you've found it.
Kemp

Re:DMA / UDMA where to start?

Post by Kemp »

I'd hate to see the lag you'd get running transfers out of all those cards at the same time. Under XP my system gets laggy when my transfers reach around the 1MB/s (8Mb/s) mark, though I think that's more related to my hard drives (been having performance issues there :( )
Pyr0Mathic

Re:DMA / UDMA where to start?

Post by Pyr0Mathic »

Lo, thx for the link.

Have read it, but isnt dma to slow to reach speeds of atleast 66 MB\s. or is the Dma chip simple going at the speed of the bus, at max? dont i need udma to reach those speeds?

Under XP my system gets laggy when my transfers reach around the 1MB/s (8Mb/s)
on what pc are u running that? and also what is your cpu load when u are using your ftp server?


Regards.
PyroMathic
nick8325
Member
Member
Posts: 200
Joined: Wed Oct 18, 2006 5:49 am

Re:DMA / UDMA where to start?

Post by nick8325 »

Yes, the DMA controller from the link is an ancient ISA thing from the dawn of time...

PCI devices, AFAIK, ignore it completely and have their own DMA controllers built in. So to get DMA working for some PCI device I think you need to read the documentation for the device, which should say how to program the DMA.

I don't know very much about ATA, but I think the transfer modes and commands are standard, but there's no standard to tell the DMA chip where to transfer the data---that depends on the chipset, I think.

P.S. I could be completely wrong :)
Kemp

Re:DMA / UDMA where to start?

Post by Kemp »

2GHz/512MB RAM. That wasn't an FTP app I was talking about though, it was using DC++. While the app could be to blame, I think it's my hard drives. One is running in PIO mode (presumably because it's on the same channel as my DVD drive, though I'm not sure), but while Windows says the other two are running in one of the UDMA modes they appear to perform as if they were running in PIO mode (quite slow, crazy CPU load doing large transfers to or from disk or from one disk to the other).

In other words, my problem probably has nothing to do with what you're talking about, sorry ;D
paulbarker

Re:DMA / UDMA where to start?

Post by paulbarker »

This is completely off topic, so feel free to ignore it.

@Kemp, same problem here. There are 2 types of ATA cable, 40 conductor (aka 40 wire) and 80 conductor (aka 80 wire). 80 wire cables are for HDDs, the 40 wire ones are for CDROMs, DVDs and other ATAPI devices. Check you have them the right way round and everything. If you havent got an 80 wire cable, get one. A 40 wire cable is usually the limiting factor when UDMA seems slow.

This was my problem and my solution, YMMV as always :)
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:DMA / UDMA where to start?

Post by Pype.Clicker »

i can offer this page of the wiklicker where i'm collecting info about UDMA programming.

HTH.
Pyr0Mathic

Re:DMA / UDMA where to start?

Post by Pyr0Mathic »

Hi, ty for the link. it seems to be very usefull.

Also found the manuel for my chipset... the intel chipset - 82371EB, the manual also covers pieces about udma, the only thing is that my shipset only supports udma 33.

Regards.
PyroMathic
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:DMA / UDMA where to start?

Post by Pype.Clicker »

afaik, as far as programming is concerned, there's no difference between UDMA 33, UDMA 66 or UDMA 999 (yet to be announced :P) ... the only difference is the "selected UDMA mode" in the drive settings, which is usually set to the highest compatible value.
Post Reply