lkml.org 
[lkml]   [2003]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] Alternate futex non-page-pinning and COW fix
    Date
    In message <Pine.LNX.4.44.0309031201170.31853-100000@home.osdl.org> you write:
    > Private mappings that haven't been broken by COW (and a read-only mapping
    > never will be) will see updates as they happen on the file that backs it.
    > That's the fundamental difference between "mmap(MAP_PRIVATE)" and
    > "read()".

    Right, so it would be consistent for someone doing a FUTEX_WAIT on an
    "intact" (not broken by COW) private mapping to see a FUTEX_WAKE done
    on that file.

    However, Jamie's futex code will see !VM_SHARED on the mapping, and
    compare futexes by mm + uaddr (rather than inode + file offset), so
    this is NOT the case. Using VM_MAYSHARE instead would make the
    MAP_SHARED readonly case work as above, though.

    The way futexes are used now, they're both "don't care". If you have
    a private mapping or read-only mapping, you'll never get woken by
    others with the same file mapped writable shared, but WTF were you
    waiting for a futex if the mapping is private anyway: the lock
    acquisition won't work (and sleeping forever is easier to debug than
    two tasks getting the lock).

    Oh no, I think I'm starting to understand the VM a little.

    Ick.

    Rusty.
    --
    Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:48    [W:7.000 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site