[lkml]   [2009]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: Should I use kmap or kmap_atomic to map user pages that will be written in a loop ?
    On Sat, 25 Jul 2009 23:41:47 +0200
    Laurent Pinchart <> wrote:

    > Pages will be written to from the kernel in USB interrupt context. I can then
    > either kmap_atomic() pages before copying data and kunmap_atomic() them right
    > after, or kmap() them once at the beginning of the video stream and keep them
    > mapped until the end.

    Video buffers can be big, and the streaming interface requires at least
    two of them. That's a lot of kmap'd pages. It seems to me that
    kmap_atomic() is the way to go for something like this.

    But, then, these are user-space buffers, and you're seemingly buffering
    the data through kernel space buffers first? It seems like using
    copy_to_user() in a workqueue (or a threaded interrupt handler) might be
    a more straightforward way to go, unless I'm missing something.


     \ /
      Last update: 2009-07-26 23:31    [W:0.033 / U:0.828 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site