From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Nick Piggin <nickpiggin@yahoo.com.au>,
Eric Dumazet <dada1@cosmosbay.com>, Ingo Molnar <mingo@elte.hu>,
Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH 3/4] futex: use fast_gup()
Date: Fri, 26 Sep 2008 19:32:22 +0200 [thread overview]
Message-ID: <20080926173313.526291890@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20080926173219.885155151@twins.programming.kicks-ass.net>
[-- Attachment #1: futex-fast_gup.patch --]
[-- Type: text/plain, Size: 950 bytes --]
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;
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-09-26 17:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-26 17:32 [PATCH 0/4] futex: get_user_pages_fast() for shared futexes Peter Zijlstra
2008-09-26 17:32 ` [PATCH 1/4] futex: rely on get_user_pages() " Peter Zijlstra
2008-09-26 17:32 ` [PATCH 2/4] futex: reduce mmap_sem usage Peter Zijlstra
2008-09-26 17:32 ` Peter Zijlstra [this message]
2008-09-26 17:32 ` [PATCH 4/4] futex: cleanup fshared Peter Zijlstra
2008-09-27 16:17 ` [PATCH 0/4] futex: get_user_pages_fast() for shared futexes Ingo Molnar
2008-09-30 7:21 ` Nick Piggin
2008-09-30 8:51 ` Peter Zijlstra
2008-09-30 10:39 ` Ingo Molnar
2008-09-30 10:42 ` Nick Piggin
2008-09-30 10:55 ` Eric Dumazet
2008-09-30 11:16 ` Peter Zijlstra
2008-10-01 3:13 ` Ulrich Drepper
2008-09-30 10:39 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080926173313.526291890@twins.programming.kicks-ass.net \
--to=a.p.zijlstra@chello.nl \
--cc=dada1@cosmosbay.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
--cc=nickpiggin@yahoo.com.au \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox