lkml.org 
[lkml]   [2008]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 3/4] futex: use fast_gup()
    Change the get_user_pages() call with fast_gup() which doesn't require holding
    the mmap_sem thereby removing the mmap_sem from all fast paths.

    Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
    ---
    kernel/futex.c | 4 +---
    1 file changed, 1 insertion(+), 3 deletions(-)

    Index: linux-2.6/kernel/futex.c
    ===================================================================
    --- linux-2.6.orig/kernel/futex.c
    +++ linux-2.6/kernel/futex.c
    @@ -232,9 +232,7 @@ static int get_futex_key(u32 __user *uad
    }

    again:
    - down_read(&mm->mmap_sem);
    - err = get_user_pages(current, mm, address, 1, 0, 0, &page, NULL);
    - up_read(&mm->mmap_sem);
    + err = get_user_pages_fast(address, 1, 0, &page);
    if (err < 0)
    return err;




    \
     
     \ /
      Last update: 2008-09-26 19:39    [W:0.020 / U:0.100 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site