lkml.org 
[lkml]   [2013]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 01/18 v2] ftrace: Add hash list to save RCU unsafe functions
On Tue, 3 Sep 2013 18:24:04 -0700
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com> wrote:


> > static DEFINE_PER_CPU(unsigned long, ftrace_rcu_func);
> > @@ -588,15 +593,14 @@ static void
> > ftrace_unsafe_callback(unsigned long ip, unsigned long parent_ip,
> > struct ftrace_ops *op, struct pt_regs *pt_regs)
> > {
> > - int bit;
> > -
> > + /* Make sure we see disabled or not first */
> > + smp_rmb();
>
> smp_mb__before_atomic_inc()?
>

Ah, but this is before an atomic_read(), and not an atomic_inc(), thus
the normal smp_rmb() is still required.

-- Steve

> > if (atomic_read(&ftrace_unsafe_rcu_disabled))
> > return;
> >
> > preempt_disable_notrace();
> >


\
 
 \ /
  Last update: 2013-09-04 04:21    [W:1.849 / U:1.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site