[lkml]   [2004]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: mlockall and mmap of IO devices don't mix
    On Tue, May 25, 2004 at 03:47:15PM -0400, Andrew Morton wrote:

    >>>>> 2.6.0-test6: the use of mlockall(2) in a process that has mmap(2)ed
    >>>>> the registers of an IO device will hang that process uninterruptibly.
    >>>>> The task runs in an infinite loop in get_user_pages(), invoking
    >>>>> follow_page() forever.

    >>>> I know this is an old thread but can anyone tell me if this problem is
    >>>> resolved in the current 2.6.6 kernel?

    >>> There's an utterly ancient patch in -mm which might fix this.

    > That patch had its first birthday last week. I wrote it in response to
    > some long-forgotten problem, failed to changelog it at the time then forgot
    > why I wrote it. I kept it in the hope that I'd remember why I wrote it. I
    > subsequently wrote a best-effort changelog but am unconvinced by it. Ho
    > hum.
    > Let me genuflect a bit. I guess we can be reasonably confident it won't
    > break anything.

    How about this for a ChangeLog (also created from memory and from some
    of your inlined comments):

    Do not follow pagetables for VM_IO regions, they might
    not have pageframes.

    Discovered when an mlockall'ed program tried to mmap
    some device's registers (using /dev/mem); the program
    hangs on the mmap, looping forever in get_user_pages(),
    trying to do a follow_page() that never succeeds.

    "Money can buy bandwidth, but latency is forever" -- John Mashey
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:03    [W:0.021 / U:13.548 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site