lkml.org 
[lkml]   [2014]   [Jul]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH tip/core/rcu 05/17] rcu: remove redundant ACCESS_ONCE() from tick_do_timer_cpu
    Date
    From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>

    In kernels built with CONFIG_NO_HZ_FULL, tick_do_timer_cpu is constant
    once boot completes. Thus, there is no need to wrap it in ACCESS_ONCE()
    in code that is built only when CONFIG_NO_HZ_FULL. This commit therefore
    removes the redundant ACCESS_ONCE().

    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    ---
    kernel/rcu/tree_plugin.h | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
    index 02ac0fb186b8..5da9f9b3abc9 100644
    --- a/kernel/rcu/tree_plugin.h
    +++ b/kernel/rcu/tree_plugin.h
    @@ -2844,7 +2844,7 @@ static bool rcu_nohz_full_cpu(struct rcu_state *rsp)
    static void rcu_bind_gp_kthread(void)
    {
    #ifdef CONFIG_NO_HZ_FULL
    - int cpu = ACCESS_ONCE(tick_do_timer_cpu);
    + int cpu = tick_do_timer_cpu;

    if (cpu < 0 || cpu >= nr_cpu_ids)
    return;
    --
    1.8.1.5


    \
     
     \ /
      Last update: 2014-07-08 01:21    [W:4.093 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site