[lkml]   [1999]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: locking user memory and kiobuf
    Juan Gonzalez wrote:
    > 3. Alternatively, can I directly manipulate the PG_locked flag for the
    > pages in question?

    From mm.h:

    * During disk I/O, PG_locked is used. This bit is set before I/O
    * and reset when I/O completes. page->wait is a wait queue of all
    * tasks waiting for the I/O on this page to complete.

    You probably want to use mem_map_inc_count() instead - you're not locking
    the page for I/O. (e.g. you're not waking up page->wait when you're

    Note that Linus has sworn that he won't accept any drivers into the
    kernel source which manipulate page tables, so those of us who do this
    need to get together and feed some fixes to Stephen Tweedie. (jeez, you
    guys seem to be coming out of the woodwork. A couple of months ago it
    seemed like I was the only one with these problems.)

    > For example, I could ensure the page(s) are in physical memory by
    > accessing a word in that page (copy_to_user)

    Yup, you need this to force COW pages, as the routine in memory.c to
    do this isn't exported. Get Stephen's rawio patch and read it, and things
    will become much clearer.

    Peter Desnoyers
    162 Pleasant St. (617) 661-1979
    Cambridge, Mass. 02139 (978) 461-0402 (work)

    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:54    [W:0.019 / U:1.584 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site