Skip to content

Commit eeb8209

Browse files
Paul E. McKenneygregkh
authored andcommitted
ia64: Add missing RCU idle APIs on idle loop
commit 93482f4 upstream. Traditionally, the entire idle task served as an RCU quiescent state. But when RCU read side critical sections started appearing within the idle loop, this traditional strategy became untenable. The fix was to create new RCU APIs named rcu_idle_enter() and rcu_idle_exit(), which must be called by each architecture's idle loop so that RCU can tell when it is safe to ignore a given idle CPU. Unfortunately, this fix was never applied to ia64, a shortcoming remedied by this commit. Reported by: Tony Luck <tony.luck@intel.com> Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Tested by: Tony Luck <tony.luck@intel.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2a853d7 commit eeb8209

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arch/ia64/kernel/process.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <linux/kdebug.h>
3030
#include <linux/utsname.h>
3131
#include <linux/tracehook.h>
32+
#include <linux/rcupdate.h>
3233

3334
#include <asm/cpu.h>
3435
#include <asm/delay.h>
@@ -279,6 +280,7 @@ cpu_idle (void)
279280

280281
/* endless idle loop with no priority at all */
281282
while (1) {
283+
rcu_idle_enter();
282284
if (can_do_pal_halt) {
283285
current_thread_info()->status &= ~TS_POLLING;
284286
/*
@@ -309,6 +311,7 @@ cpu_idle (void)
309311
normal_xtp();
310312
#endif
311313
}
314+
rcu_idle_exit();
312315
schedule_preempt_disabled();
313316
check_pgt_cache();
314317
if (cpu_is_offline(cpu))

0 commit comments

Comments
 (0)