lkml.org 
[lkml]   [2009]   [Dec]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH] asynchronous page fault.
* Peter Zijlstra <peterz@infradead.org> [2009-12-28 09:32:53]:

> On Mon, 2009-12-28 at 06:27 +0530, Balbir Singh 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?
>
> rcu_assign_pointer() is the write side, but if you need a barrier, you
> can make do with a single smp_wmb() after doing the rb-tree op. There is
> no need to add multiple in the tree-ops themselves.
>

Yes, that makes sense.

> You cannot make the assignment paths atomic (without locks) that's the
> whole problem.
>

True, but pre-emption can be nasty in some cases. But I am no expert
in the atomicity of operations like assignments across architectures.
I assume all word, long assignments are.

--
Balbir


\
 
 \ /
  Last update: 2009-12-29 10:57    [W:0.193 / U:0.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site