diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-06-21 16:00:57 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-08-18 21:58:43 -0400 |
commit | eb348b898290da242e46df75ab0b9772003e08b8 (patch) | |
tree | f35ed4203ca3af3489e780430685a09bcb6a5f92 /kernel/rcutree.c | |
parent | 2333210b26cf7aaf48d71343029afb860103d9f9 (diff) |
nohz_full: Add per-CPU idle-state tracking
This commit adds the code that updates the rcu_dyntick structure's
new fields to track the per-CPU idle state based on interrupts and
transitions into and out of the idle loop (NMIs are ignored because NMI
handlers cannot cleanly read out the time anyway). This code is similar
to the code that maintains RCU's idea of per-CPU idleness, but differs
in that RCU treats CPUs running in user mode as idle, where this new
code does not.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r-- | kernel/rcutree.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c index 4f27b85d8c86..b0d2cc3ea15a 100644 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c | |||
@@ -431,6 +431,7 @@ void rcu_idle_enter(void) | |||
431 | 431 | ||
432 | local_irq_save(flags); | 432 | local_irq_save(flags); |
433 | rcu_eqs_enter(false); | 433 | rcu_eqs_enter(false); |
434 | rcu_sysidle_enter(&__get_cpu_var(rcu_dynticks), 0); | ||
434 | local_irq_restore(flags); | 435 | local_irq_restore(flags); |
435 | } | 436 | } |
436 | EXPORT_SYMBOL_GPL(rcu_idle_enter); | 437 | EXPORT_SYMBOL_GPL(rcu_idle_enter); |
@@ -481,6 +482,7 @@ void rcu_irq_exit(void) | |||
481 | trace_rcu_dyntick(TPS("--="), oldval, rdtp->dynticks_nesting); | 482 | trace_rcu_dyntick(TPS("--="), oldval, rdtp->dynticks_nesting); |
482 | else | 483 | else |
483 | rcu_eqs_enter_common(rdtp, oldval, true); | 484 | rcu_eqs_enter_common(rdtp, oldval, true); |
485 | rcu_sysidle_enter(rdtp, 1); | ||
484 | local_irq_restore(flags); | 486 | local_irq_restore(flags); |
485 | } | 487 | } |
486 | 488 | ||
@@ -549,6 +551,7 @@ void rcu_idle_exit(void) | |||
549 | 551 | ||
550 | local_irq_save(flags); | 552 | local_irq_save(flags); |
551 | rcu_eqs_exit(false); | 553 | rcu_eqs_exit(false); |
554 | rcu_sysidle_exit(&__get_cpu_var(rcu_dynticks), 0); | ||
552 | local_irq_restore(flags); | 555 | local_irq_restore(flags); |
553 | } | 556 | } |
554 | EXPORT_SYMBOL_GPL(rcu_idle_exit); | 557 | EXPORT_SYMBOL_GPL(rcu_idle_exit); |
@@ -600,6 +603,7 @@ void rcu_irq_enter(void) | |||
600 | trace_rcu_dyntick(TPS("++="), oldval, rdtp->dynticks_nesting); | 603 | trace_rcu_dyntick(TPS("++="), oldval, rdtp->dynticks_nesting); |
601 | else | 604 | else |
602 | rcu_eqs_exit_common(rdtp, oldval, true); | 605 | rcu_eqs_exit_common(rdtp, oldval, true); |
606 | rcu_sysidle_exit(rdtp, 1); | ||
603 | local_irq_restore(flags); | 607 | local_irq_restore(flags); |
604 | } | 608 | } |
605 | 609 | ||