Recommended DMA buffer size

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
srg

Recommended DMA buffer size

Post by srg »

Hi

In my ISA DMA driver I'm going to implement a pimple static buffer that I know is loaded under 16MB for all DMA operations.

My plan is to have this the full 128K is size, but I'm thinking that maybe this is larger than I need.

What size would you recommend for the buffer? 64K perhaps?

thanks
srg
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:Recommended DMA buffer size

Post by Brendan »

Hi,
srg wrote: My plan is to have this the full 128K is size, but I'm thinking that maybe this is larger than I need.

What size would you recommend for the buffer? 64K perhaps?
I'd use a buffer for each channel in use, where the size of the buffer is determined by the code (device driver) that wants to use ISA DMA. That way if nothing is using DMA you'd use no memory. A floppy disk driver could use 18 Kb (enough to buffer a cylinder of 1.44 Mb floppy data) rather than the full 64 Kb.

If you're using a static buffer you'd need 64 Kb for the 8 bit channels 0, 1, 2 & 3, and 128 Kb for the 16 bit channels 5, 6 & 7. That adds up to 640 Kb.


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Post Reply