From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
To: balbir@linux.vnet.ibm.com
Cc: Peter Zijlstra <peterz@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"minchan.kim@gmail.com" <minchan.kim@gmail.com>,
cl@linux-foundation.org
Subject: Re: [RFC PATCH] asynchronous page fault.
Date: Mon, 28 Dec 2009 10:05:14 +0900 [thread overview]
Message-ID: <20091228100514.ec6f9949.kamezawa.hiroyu@jp.fujitsu.com> (raw)
In-Reply-To: <20091228005746.GE3601@balbir.in.ibm.com>
On Mon, 28 Dec 2009 06:27:46 +0530
Balbir Singh <balbir@linux.vnet.ibm.com> wrote:
> * Peter Zijlstra <peterz@infradead.org> [2009-12-27 12:19:56]:
>
> > Your changelog states as much.
> >
> > "Even if RB-tree rotation occurs while we walk tree for look-up, we just
> > miss vma without oops."
> >
> > However, since this is the case, do we still need the
> > rcu_assign_pointer() conversion your patch does? All I can see it do is
> > slow down all RB-tree users, without any gain.
>
> Don't we need the rcu_assign_pointer() on the read side primarily to
> make sure the pointer is still valid and assignments (writes) are not
> re-ordered? Are you suggesting that the pointer assignment paths be
> completely atomic?
>
>From following reasons.
- What we have to avoid is not to touch unkonwn memory via broken pointer.
This is speculative look up and can miss vmas. So, even if tree is broken,
there is no problem. Broken pointer which points to places other than rb-tree
is problem.
- rb-tree's rb_left and rb_right don't points to memory other than
rb-tree. (or NULL) And vmas are not freed/reused while rcu_read_lock().
Then, we don't dive into unknown memory.
- Then, we can skip rcu_assign_pointer().
Thanks,
-Kame
--
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:[~2009-12-28 1:08 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-25 1:51 KAMEZAWA Hiroyuki
2009-12-27 9:47 ` Minchan Kim
2009-12-27 23:59 ` KAMEZAWA Hiroyuki
2009-12-27 11:19 ` Peter Zijlstra
2009-12-28 0:00 ` KAMEZAWA Hiroyuki
2009-12-28 0:57 ` Balbir Singh
2009-12-28 1:05 ` KAMEZAWA Hiroyuki [this message]
2009-12-28 2:58 ` Balbir Singh
2009-12-28 3:13 ` KAMEZAWA Hiroyuki
2009-12-28 8:34 ` Peter Zijlstra
2009-12-28 8:32 ` Peter Zijlstra
2009-12-29 9:54 ` Balbir Singh
2009-12-27 12:03 ` Peter Zijlstra
2009-12-28 0:36 ` KAMEZAWA Hiroyuki
2009-12-28 1:19 ` KAMEZAWA Hiroyuki
2009-12-28 8:30 ` Peter Zijlstra
2009-12-28 9:58 ` KAMEZAWA Hiroyuki
2009-12-28 10:30 ` Peter Zijlstra
2009-12-28 10:40 ` Peter Zijlstra
2010-01-02 16:14 ` Peter Zijlstra
2010-01-04 3:02 ` Paul E. McKenney
2010-01-04 7:53 ` Peter Zijlstra
2010-01-04 15:55 ` Paul E. McKenney
2010-01-04 16:02 ` Peter Zijlstra
2010-01-04 16:56 ` Paul E. McKenney
2010-01-04 13:48 ` [RFC PATCH -v2] speculative " Peter Zijlstra
2009-12-28 10:57 ` [RFC PATCH] asynchronous " KAMEZAWA Hiroyuki
2009-12-28 11:06 ` Peter Zijlstra
2009-12-28 8:55 ` Peter Zijlstra
2009-12-28 10:08 ` KAMEZAWA Hiroyuki
2009-12-28 11:43 ` Peter Zijlstra
2010-01-02 21:45 ` Benjamin Herrenschmidt
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=20091228100514.ec6f9949.kamezawa.hiroyu@jp.fujitsu.com \
--to=kamezawa.hiroyu@jp.fujitsu.com \
--cc=balbir@linux.vnet.ibm.com \
--cc=cl@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan.kim@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox