OSDev.org

The Place to Start for Operating System Developers
It is currently Thu May 02, 2024 12:41 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: DMA / UDMA where to start?
PostPosted: Thu Apr 13, 2006 3:28 am 
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


Top
  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Thu Apr 13, 2006 4:44 am 
Offline
Member
Member
User avatar

Joined: Thu Nov 16, 2006 12:01 pm
Posts: 7614
Location: Germany
FAQ: DMA

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


Top
 Profile  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Thu Apr 13, 2006 7:44 am 
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 :( )


Top
  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Thu Apr 13, 2006 7:48 am 
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?


Quote:
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


Top
  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Thu Apr 13, 2006 9:21 am 
Offline
Member
Member

Joined: Wed Oct 18, 2006 5:49 am
Posts: 200
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 :)


Top
 Profile  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Thu Apr 13, 2006 9:33 am 
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


Top
  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Thu Apr 13, 2006 10:17 am 
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 :)


Top
  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Fri Apr 14, 2006 9:06 am 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
i can offer this page of the wiklicker where i'm collecting info about UDMA programming.

HTH.

_________________
Image May the source be with you.


Top
 Profile  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Fri Apr 14, 2006 1:13 pm 
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


Top
  
 
 Post subject: Re:DMA / UDMA where to start?
PostPosted: Fri Apr 14, 2006 1:58 pm 
Offline
Member
Member
User avatar

Joined: Wed Oct 18, 2006 2:31 am
Posts: 5964
Location: In a galaxy, far, far away
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.

_________________
Image May the source be with you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot] and 30 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group