Page 1 of 1

Recommended DMA buffer size

Posted: Mon Jul 26, 2004 6:12 am
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

Re:Recommended DMA buffer size

Posted: Mon Jul 26, 2004 8:38 am
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