Messages in this thread | | | Date | Fri, 25 Jul 2008 09:33:11 +0200 | From | Clemens Ladisch <> | Subject | Re: DMA with PCIe and very large DMA transfers |
| |
Jesse Barnes wrote: > On Thursday, July 24, 2008 8:06 am Alex wrote: > > I'm also interested in knowing if any drivers perform very large DMA > > transfers. I'm putting together a driver for a specialist high-speed > > data acquisition device that typically might need a DMA buffer of > > 100-500MB (ouch!) in the low 32 bit address space (or possibly 36 bit > > address space, but I'm not sure if this is possible to allocate > > without allocating as much as possible and then discarding?) but only > > supports a very limited number of scatter/gather entries (between 1 > > and 4). [...] > > It sounds like you'll probably have fairly special purpose configurations. In > that case, it may be reasonable to reserve your large DMA buffers at boot > time, assuming you need large, contiguous chunks of physical memory.
Most of the sound drivers do this because few chips support SG.
> > I assume that to allocate that much memory in physical contiguous > > addresses will require a driver to be loaded as soon as possible at > > startup. I was thinking about trying to grab a lot of high-order pages > > and try and make them one contiguous block - is that feasible? > > Browsing the archives, I found references to early allocation for > > large buffers, but no direct links to existing examples or recommended > > techniques on how to stitch pages together in to a single buffer.
Have a look into sound/core/memalloc.c. It tries to get a contiguous block from the kernel; I don't think that it's possible to do this manually if the kernel has failed.
Regards, Clemens
| |