lkml.org 
[lkml]   [2011]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: high-order allocation + highmem + streaming DMA - possible?
    Date
    > > Hello.
    > >
    > > We are writing a driver for a custom PCI device that receives large
    > > amount of data.
    > >
    > > Device is capable of DMAing received data in 64k chunks.
    > >
    > > We have been going to:
    > > - use physically-continuous 64k-sized memory areas using alloc_pages()
    > > with order=4,
    > > - allocate large number of such areas on driver init,
    > > - implement mmap() to map those all to userspace for zero-copy
    > > processing, - use streaming DMA to actually receive data
    >
    > May i know why u want to mmap to userspace instead of using a
    > device? performance is affected by a large amount if u use mmap

    mmap() is done once, at initialization time, for entire data buffer.
    Later data is processed in zero-copy pattern.
    I believe it is fastest possible solution.

    > > Is there a way to use streaming DMA with large memory areas located in
    > > highmem?
    >
    > I dont think DMA is available for highmem? Not sure though . never saw
    > a usecase for it.

    DMA is definitly available for highmem on per-page basis.
    I'm interested in DMA of larger blocks.

    Nikita


    \
     
     \ /
      Last update: 2011-10-19 12:57    [W:8.772 / U:0.084 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site