lkml.org 
[lkml]   [2017]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH tip/core/rcu 3/6] rcu: Abstract dynticks extended quiescent state enter/exit operations
    On Sat, Jan 14, 2017 at 12:54:42AM -0800, Paul E. McKenney wrote:
    > /*
    > + * Record entry into an extended quiescent state. This is only to be
    > + * called when not already in an extended quiescent state.
    > + */
    > +static void rcu_dynticks_eqs_enter(void)
    > +{
    > + struct rcu_dynticks *rdtp = this_cpu_ptr(&rcu_dynticks);
    > +
    > + /*
    > + * CPUs seeing atomic_inc() must see prior RCU read-side critical
    > + * sections, and we also must force ordering with the next idle
    > + * sojourn.
    > + */
    > + smp_mb__before_atomic(); /* See above. */
    > + atomic_inc(&rdtp->dynticks);
    > + smp_mb__after_atomic(); /* See above. */
    > + WARN_ON_ONCE(IS_ENABLED(CONFIG_RCU_EQS_DEBUG) &&
    > + atomic_read(&rdtp->dynticks) & 0x1);
    > +}

    In an earlier patch you replaced things with atomic_add_return(), why
    not use atomic_inc_return() here?

    \
     
     \ /
      Last update: 2017-01-16 17:47    [W:2.662 / U:0.224 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site