Skip to content

Commit

Permalink
rcu: Eliminate in_irq() checks in rcu_enter_nohz()
Browse files Browse the repository at this point in the history
The in_irq() check in rcu_enter_nohz() is redundant because if we really
are in an interrupt, the attempt to re-enter dyntick-idle mode will invoke
rcu_needs_cpu() in any case, which will force the check for RCU callbacks.
So this commit removes the check along with the set_need_resched().

Suggested-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Paul E. McKenney committed Sep 29, 2011
1 parent fc0763f commit 717f98f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,13 +373,6 @@ void rcu_enter_nohz(void)
smp_mb__after_atomic_inc(); /* Force ordering with next sojourn. */
WARN_ON_ONCE(atomic_read(&rdtp->dynticks) & 0x1);
local_irq_restore(flags);

/* If the interrupt queued a callback, get out of dyntick mode. */
if (in_irq() &&
(__get_cpu_var(rcu_sched_data).nxtlist ||
__get_cpu_var(rcu_bh_data).nxtlist ||
rcu_preempt_needs_cpu(smp_processor_id())))
set_need_resched();
}

/*
Expand Down

0 comments on commit 717f98f

Please sign in to comment.