[lkml]   [1999]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: locking user memory and kiobuf
    Alan Cox wrote:
    > > kiobuf sounds perfect for a problem we have. Currently I use mmap() to map
    > > pages from __get_free_pages() into user space for dma. This is not totally
    > > satisfactory, tho, in part because the resulting group of pages is not mapped
    > > contiguously into kernel.
    > If you have a situation where that is hard to handle you can vmalloc a block
    > of memory then map that into user space. drivers/char/bttv.c does it. Its
    > ugly and bttv needs to switch to kiovecs in 2.3.x if I get time.

    On a tangent issue, is there an example somewhere of driver code storing
    and retrieving objects from VM? something along the lines of

    ptr = page_address(page);
    /* access ptr */
    unlock_pack(page); /* page can now be swapped out if necessary */

    Jeff Garzik | Just once, I wish we would encounter
    Building 1024 | an alien menace that wasn't immune to
    MandrakeSoft, Inc. | bullets. -- The Brigadier, "Dr. Who"

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:55    [W:0.019 / U:16.212 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site