lkml.org 
[lkml]   [2011]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RFC tip/core/rcu 11/11] rcu: move TREE_RCU from softirq to kthread
From
Date
On Wed, 2011-02-23 at 11:34 -0600, Christoph Lameter wrote:

> > > True, but we could also argue that the multiple checks for being preempt
> > > can also be an issue.
> >
> > At least on x86 preemption don't actually need to be disabled: selection
> > of the right per-cpu memory location is done atomically with the rest of
> > the instruction by the segment selector.
>
> Right.

But a test still needs to be made. Because three access of this_cpu_*()
that gets preempted and scheduled on another CPU can access a different
CPU var for each access. This does not matter how atomic the
this_cpu_*() code is.

IOW, the use of this_cpu_*() without preemption disabled is 99% of the
time a bug.

-- Steve




\
 
 \ /
  Last update: 2011-02-23 19:19    [W:0.359 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site