[lkml]   [2009]   [Dec]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [RFC PATCH] asynchronous page fault.
On Mon, 28 Dec 2009 06:27:46 +0530
Balbir Singh <> wrote:

> * Peter Zijlstra <> [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().


 \ /
  Last update: 2009-12-28 02:11    [W:0.175 / U:4.056 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site