[lkml]   [2003]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Alternate futex non-page-pinning and COW fix
    On Wed, 3 Sep 2003, Linus Torvalds wrote:
    > Actually: the VM_SHARED flag will never change, so testing VM_SHARED is
    > actually the _right_ thing from a mm perspective.
    > The only person who should ever test VM_MAYSHARE is somebody who does
    > reporting back to user space: VM_MAYSHARE basically ends up meaning "the
    > user _asked_ for a shared mapping". While "VM_SHARED" means "this mapping
    > can actually contain a shared dirty page".
    > The VM itself should only ever care about VM_SHARED. Because that's the
    > only bit that has real semantic meaning.

    To that part of the kernel interested in dirty pages, yes.
    But when interested in futexes, it seems not.

    If we're going to document a behaviour as depending on whether the user
    said MAP_SHARED or MAP_PRIVATE, then it's VM_MAYSHARE we should check to
    decide which behaviour to use.

    We could use VM_SHARED, and document the behaviour of the futex as
    depending on whether it's in an area that was MAP_SHARED from a file
    which was opened for writing as well as reading - but do we really
    want to complicate the documentation that way? Principle of least
    least surprise, principle of minimal doc.


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