All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andi Kleen <andi@firstfloor.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	cl@linux-foundation.org,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	minchan.kim@gmail.com
Subject: Re: [mm][RFC][PATCH 0/11] mm accessor updates.
Date: Thu, 17 Dec 2009 09:40:46 +0100	[thread overview]
Message-ID: <20091217084046.GA9804@basil.fritz.box> (raw)
In-Reply-To: <1261004224.21028.500.camel@laptop>

On Wed, Dec 16, 2009 at 11:57:04PM +0100, Peter Zijlstra wrote:
> On Wed, 2009-12-16 at 19:31 +0900, KAMEZAWA Hiroyuki wrote:
> 
> > The problem of range locking is more than mmap_sem, anyway. I don't think
> > it's possible easily.
> 
> We already have a natural range lock in the form of the split pte lock.
> 
> If we make the vma lookup speculative using RCU, we can use the pte lock

One problem is here that mmap_sem currently contains sleeps
and RCU doesn't work for blocking operations until a custom
quiescent period is defined.

> to verify we got the right vma, because munmap requires the pte lock to
> complete the unmap.

Ok.

> 
> The fun bit is dealing with the fallout if we got it wrong, since we
> might then have instantiated page-tables not covered by a vma just to
> take the pte lock, it also requires we RCU free the page-tables iirc.

That makes sense.

> 
> There are a few interesting cases like stack extention and hugetlbfs,
> but I think we could start by falling back to mmap_sem locked behaviour
> if the speculative thing fails.

You mean fall back to mmap_sem if anything sleeps? Maybe. Would need
to check how many such points are really there.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <andi@firstfloor.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	Andi Kleen <andi@firstfloor.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	cl@linux-foundation.org,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"mingo@elte.hu" <mingo@elte.hu>,
	minchan.kim@gmail.com
Subject: Re: [mm][RFC][PATCH 0/11] mm accessor updates.
Date: Thu, 17 Dec 2009 09:40:46 +0100	[thread overview]
Message-ID: <20091217084046.GA9804@basil.fritz.box> (raw)
In-Reply-To: <1261004224.21028.500.camel@laptop>

On Wed, Dec 16, 2009 at 11:57:04PM +0100, Peter Zijlstra wrote:
> On Wed, 2009-12-16 at 19:31 +0900, KAMEZAWA Hiroyuki wrote:
> 
> > The problem of range locking is more than mmap_sem, anyway. I don't think
> > it's possible easily.
> 
> We already have a natural range lock in the form of the split pte lock.
> 
> If we make the vma lookup speculative using RCU, we can use the pte lock

One problem is here that mmap_sem currently contains sleeps
and RCU doesn't work for blocking operations until a custom
quiescent period is defined.

> to verify we got the right vma, because munmap requires the pte lock to
> complete the unmap.

Ok.

> 
> The fun bit is dealing with the fallout if we got it wrong, since we
> might then have instantiated page-tables not covered by a vma just to
> take the pte lock, it also requires we RCU free the page-tables iirc.

That makes sense.

> 
> There are a few interesting cases like stack extention and hugetlbfs,
> but I think we could start by falling back to mmap_sem locked behaviour
> if the speculative thing fails.

You mean fall back to mmap_sem if anything sleeps? Maybe. Would need
to check how many such points are really there.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

--
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>

  reply	other threads:[~2009-12-17  8:40 UTC|newest]

Thread overview: 125+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-16  3:00 [mm][RFC][PATCH 0/11] mm accessor updates KAMEZAWA Hiroyuki
2009-12-16  3:00 ` KAMEZAWA Hiroyuki
2009-12-16  3:01 ` [mm][RFC][PATCH 1/11] mm accessor for replacing mmap_sem KAMEZAWA Hiroyuki
2009-12-16  3:01   ` KAMEZAWA Hiroyuki
2009-12-16  3:02 ` [mm][RFC][PATCH 2/11] mm accessor for kernel core KAMEZAWA Hiroyuki
2009-12-16  3:02   ` KAMEZAWA Hiroyuki
2009-12-16  3:03 ` [mm][RFC][PATCH 3/11] mm accessor for fs KAMEZAWA Hiroyuki
2009-12-16  3:03   ` KAMEZAWA Hiroyuki
2009-12-16  3:04 ` [mm][RFC][PATCH 4/11] mm accessor for kvm KAMEZAWA Hiroyuki
2009-12-16  3:04   ` KAMEZAWA Hiroyuki
2009-12-16  3:05 ` [mm][RFC][PATCH 5/11] mm accessor for tomoyo KAMEZAWA Hiroyuki
2009-12-16  3:05   ` KAMEZAWA Hiroyuki
2009-12-16  3:06 ` [mm][RFC][PATCH 6/11] mm accessor for driver/gpu KAMEZAWA Hiroyuki
2009-12-16  3:06   ` KAMEZAWA Hiroyuki
2009-12-16  3:07 ` [mm][RFC][PATCH 7/11] mm accessor for inifiniband KAMEZAWA Hiroyuki
2009-12-16  3:07   ` KAMEZAWA Hiroyuki
2009-12-16  3:08 ` [mm][RFC][PATCH 8/11] mm accessor for video KAMEZAWA Hiroyuki
2009-12-16  3:08   ` KAMEZAWA Hiroyuki
2009-12-16  3:09 ` [mm][RFC][PATCH 9/11] mm accessor for sgi gru KAMEZAWA Hiroyuki
2009-12-16  3:09   ` KAMEZAWA Hiroyuki
2009-12-16  3:10 ` [mm][RFC][PATCH 10/11] mm accessor for misc drivers KAMEZAWA Hiroyuki
2009-12-16  3:10   ` KAMEZAWA Hiroyuki
2009-12-16  3:11 ` [mm][RFC][PATCH 11/11] mm accessor for x86 KAMEZAWA Hiroyuki
2009-12-16  3:11   ` KAMEZAWA Hiroyuki
2009-12-16 10:11 ` [mm][RFC][PATCH 0/11] mm accessor updates Andi Kleen
2009-12-16 10:11   ` Andi Kleen
2009-12-16 10:13   ` KAMEZAWA Hiroyuki
2009-12-16 10:13     ` KAMEZAWA Hiroyuki
2009-12-16 10:28     ` Andi Kleen
2009-12-16 10:28       ` Andi Kleen
2009-12-16 10:31       ` KAMEZAWA Hiroyuki
2009-12-16 10:31         ` KAMEZAWA Hiroyuki
2009-12-16 10:49         ` Andi Kleen
2009-12-16 10:49           ` Andi Kleen
2009-12-16 11:12           ` KAMEZAWA Hiroyuki
2009-12-16 11:12             ` KAMEZAWA Hiroyuki
2009-12-16 11:31             ` Andi Kleen
2009-12-16 11:31               ` Andi Kleen
2009-12-16 16:27               ` Christoph Lameter
2009-12-16 16:27                 ` Christoph Lameter
2009-12-16 23:01                 ` Peter Zijlstra
2009-12-16 23:01                   ` Peter Zijlstra
2009-12-17  4:11                   ` KOSAKI Motohiro
2009-12-17  4:11                     ` KOSAKI Motohiro
2009-12-17  8:41                   ` Andi Kleen
2009-12-17  8:41                     ` Andi Kleen
2009-12-16 22:57         ` Peter Zijlstra
2009-12-16 22:57           ` Peter Zijlstra
2009-12-17  8:40           ` Andi Kleen [this message]
2009-12-17  8:40             ` Andi Kleen
2009-12-17  8:45             ` Peter Zijlstra
2009-12-17  8:45               ` Peter Zijlstra
2009-12-17  8:54               ` Andi Kleen
2009-12-17  8:54                 ` Andi Kleen
2009-12-17 14:45                 ` Paul E. McKenney
2009-12-17 14:45                   ` Paul E. McKenney
2009-12-17 15:02                   ` Peter Zijlstra
2009-12-17 15:02                     ` Peter Zijlstra
2009-12-17 17:53                   ` Andi Kleen
2009-12-17 17:53                     ` Andi Kleen
2009-12-17 19:08                     ` Paul E. McKenney
2009-12-17 19:08                       ` Paul E. McKenney
2009-12-17 19:55                       ` Andi Kleen
2009-12-17 19:55                         ` Andi Kleen
2009-12-17 19:56                         ` Christoph Lameter
2009-12-17 19:56                           ` Christoph Lameter
2009-12-17 20:14                           ` Peter Zijlstra
2009-12-17 20:14                             ` Peter Zijlstra
2009-12-17 20:42                             ` Christoph Lameter
2009-12-17 20:42                               ` Christoph Lameter
2009-12-18  5:17                               ` Ingo Molnar
2009-12-18  5:17                                 ` Ingo Molnar
2009-12-18 17:00                                 ` Avi Kivity
2009-12-18 17:00                                   ` Avi Kivity
2009-12-18 17:12                                   ` Ingo Molnar
2009-12-18 17:12                                     ` Ingo Molnar
2009-12-18 18:12                                     ` Christoph Lameter
2009-12-18 18:12                                       ` Christoph Lameter
2009-12-18 18:43                                       ` Andi Kleen
2009-12-18 18:43                                         ` Andi Kleen
2009-12-18 18:45                                       ` Ingo Molnar
2009-12-18 18:45                                         ` Ingo Molnar
2009-12-18 23:18                                         ` KAMEZAWA Hiroyuki
2009-12-18 23:18                                           ` KAMEZAWA Hiroyuki
2009-12-17 19:33             ` Christoph Lameter
2009-12-17 19:33               ` Christoph Lameter
2009-12-17 20:07               ` Peter Zijlstra
2009-12-17 20:07                 ` Peter Zijlstra
2009-12-17 20:13                 ` Christoph Lameter
2009-12-17 20:13                   ` Christoph Lameter
2009-12-17 20:19                   ` Peter Zijlstra
2009-12-17 20:19                     ` Peter Zijlstra
2009-12-16 10:31       ` Minchan Kim
2009-12-16 10:31         ` Minchan Kim
2009-12-16 10:33         ` KAMEZAWA Hiroyuki
2009-12-16 10:33           ` KAMEZAWA Hiroyuki
2009-12-18  0:38           ` [RFC 0/4] speculative page fault (Was " KAMEZAWA Hiroyuki
2009-12-18  0:41             ` [RFC 1/4] uninline mm accessor KAMEZAWA Hiroyuki
2009-12-18  0:41               ` KAMEZAWA Hiroyuki
2009-12-18  0:43             ` [RFC 2/4] add mm event counter KAMEZAWA Hiroyuki
2009-12-18  0:43               ` KAMEZAWA Hiroyuki
2009-12-19  3:23               ` Minchan Kim
2009-12-19  3:23                 ` Minchan Kim
2009-12-19  6:37                 ` KAMEZAWA Hiroyuki
2009-12-19  6:37                   ` KAMEZAWA Hiroyuki
2009-12-18  0:45             ` [RFC 3/4] lockless vma caching KAMEZAWA Hiroyuki
2009-12-18  0:45               ` KAMEZAWA Hiroyuki
2009-12-19  3:43               ` Minchan Kim
2009-12-19  3:43                 ` Minchan Kim
2009-12-19  6:44                 ` KAMEZAWA Hiroyuki
2009-12-19  6:44                   ` KAMEZAWA Hiroyuki
2009-12-18  0:46             ` [RFC 4/4] speculative pag fault KAMEZAWA Hiroyuki
2009-12-18  0:46               ` KAMEZAWA Hiroyuki
2009-12-18  5:54               ` Minchan Kim
2009-12-18  5:54                 ` Minchan Kim
2009-12-18  6:06                 ` KAMEZAWA Hiroyuki
2009-12-18  6:06                   ` KAMEZAWA Hiroyuki
2009-12-18  6:33                   ` Minchan Kim
2009-12-18  6:33                     ` Minchan Kim
2009-12-19  3:55               ` Minchan Kim
2009-12-19  3:55                 ` Minchan Kim
2009-12-19  6:49                 ` KAMEZAWA Hiroyuki
2009-12-19  6:49                   ` KAMEZAWA Hiroyuki
2009-12-16 16:24   ` [mm][RFC][PATCH 0/11] mm accessor updates Christoph Lameter
2009-12-16 16:24     ` Christoph Lameter

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=20091217084046.GA9804@basil.fritz.box \
    --to=andi@firstfloor.org \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux-foundation.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan.kim@gmail.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.