• Darren Hart's avatar
    futex: update futex commentary · b2d0994b
    Darren Hart authored
    Impact: cleanup
    
    The futex_hash_bucket can be a bit confusing when first looking
    at the code as it is a shared queue (and futex_q isn't a queue
    at all, but rather an element on the queue).
    
    The mmap_sem is no longer held outside of the
    futex_handle_fault() routine, yet numerous comments refer to it.
    The fshared argument is no an integer.  I left some of these
    comments along as they are simply removed in future patches.
    
    Some of the commentary refering to futexes by virtual page
    mappings was not very clear, and completely accurate (as for
    shared futexes both the page and the offset are used to
    determine the key).  For the purposes of the function
    description, just referring to "the futex" seems sufficient.
    
    With hashed futexes we now access the page after the hash-bucket
    is locked, and not only after it is enqueued.
    Signed-off-by: default avatarDarren Hart <dvhltc@us.ibm.com>
    Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
    Cc: Rusty Russell <rusty@rustcorp.com.au>
    LKML-Reference: <20090312075537.9856.29954.stgit@Aeon>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    b2d0994b
futex.c 48.9 KB