sofirq: make rcu_irq_enter()/rcu_irq_exit() called in pairs
PATCH 1/1 sofirq: make rcu_irq_enter()/rcu_irq_exit() called in pairs
irq_enter() calls rcu_irq_enter() unconditionally, the same as irq_exit() calls rcu_irq_exit().
It does not change the binary because rcu_irq_enter() is dummy when !CONFIG_NO_HZ.
It's just a cleanup.
Signed-off-by Lai Jiangshan <[email protected]>
---
kernel/softirq.c +1 -1
@@ -302,9 +302,9 @@ void irq_exit(void)if (!in_interrupt () &&local_softirq_pending ())invoke_softirq (); +rcu_irq_exit ();#ifdef CONFIG_NO_HZ /* Make sure that timer wheel updates are propagated */ -rcu_irq_exit ();if (idle_cpu (smp_processor_id ()) && !in_interrupt () && !need_resched ())tick_nohz_stop_sched_tick (0 );#endif
Quoted 8 lines · Lai Jiangshan
irq_enter()callsrcu_irq_enter()unconditionally, the same asirq_exit()callsrcu_irq_exit().It does not change the binary because
rcu_irq_enter()is dummy when !CONFIG_NO_HZ.It's just a cleanup.
This does look like a nice cleanup! I will pull it in and test it.
Yes, it should be provably the same, but RCU has taught me to be quite paranoid. ;-)
Thanx, Paul
Quoted 18 lines
Signed-off-by Lai Jiangshan <[email protected]>---
kernel/softirq.c +1
-1@@ -302,9 +302,9 @@ void irq_exit(void)if (!in_interrupt () &&local_softirq_pending ())invoke_softirq (); +rcu_irq_exit ();#ifdef CONFIG_NO_HZ /* Make sure that timer wheel updates are propagated */ -rcu_irq_exit ();if (idle_cpu (smp_processor_id ()) && !in_interrupt () && !need_resched ())tick_nohz_stop_sched_tick (0 );#endif