aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 16:36:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-14 16:36:04 -0400
commit078838d56574694d0a4815d9c1b7f28e8844638b (patch)
tree0d8c72d9dc46b0d2e72073fb928ec08e14b02b76 /kernel/sched
parenteeee78cf77df0450ca285a7cd6d73842181e825c (diff)
parent590ee7dbd569a012df705a5204fc5f1066f52b8c (diff)
Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU changes from Ingo Molnar: "The main changes in this cycle were: - changes permitting use of call_rcu() and friends very early in boot, for example, before rcu_init() is invoked. - add in-kernel API to enable and disable expediting of normal RCU grace periods. - improve RCU's handling of (hotplug-) outgoing CPUs. - NO_HZ_FULL_SYSIDLE fixes. - tiny-RCU updates to make it more tiny. - documentation updates. - miscellaneous fixes" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (58 commits) cpu: Provide smpboot_thread_init() on !CONFIG_SMP kernels as well cpu: Defer smpboot kthread unparking until CPU known to scheduler rcu: Associate quiescent-state reports with grace period rcu: Yet another fix for preemption and CPU hotplug rcu: Add diagnostics to grace-period cleanup rcutorture: Default to grace-period-initialization delays rcu: Handle outgoing CPUs on exit from idle loop cpu: Make CPU-offline idle-loop transition point more precise rcu: Eliminate ->onoff_mutex from rcu_node structure rcu: Process offlining and onlining only at grace-period start rcu: Move rcu_report_unblock_qs_rnp() to common code rcu: Rework preemptible expedited bitmask handling rcu: Remove event tracing from rcu_cpu_notify(), used by offline CPUs rcutorture: Enable slow grace-period initializations rcu: Provide diagnostic option to slow down grace-period initialization rcu: Detect stalls caused by failure to propagate up rcu_node tree rcu: Eliminate empty HOTPLUG_CPU ifdef rcu: Simplify sync_rcu_preempt_exp_init() rcu: Put all orphan-callback-related code under same comment rcu: Consolidate offline-CPU callback initialization ...
Diffstat (limited to 'kernel/sched')
-rw-r--r--kernel/sched/idle.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index 4d207d2abcbd..deef1caa94c6 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -209,6 +209,8 @@ use_default:
209 goto exit_idle; 209 goto exit_idle;
210} 210}
211 211
212DEFINE_PER_CPU(bool, cpu_dead_idle);
213
212/* 214/*
213 * Generic idle loop implementation 215 * Generic idle loop implementation
214 * 216 *
@@ -233,8 +235,13 @@ static void cpu_idle_loop(void)
233 check_pgt_cache(); 235 check_pgt_cache();
234 rmb(); 236 rmb();
235 237
236 if (cpu_is_offline(smp_processor_id())) 238 if (cpu_is_offline(smp_processor_id())) {
239 rcu_cpu_notify(NULL, CPU_DYING_IDLE,
240 (void *)(long)smp_processor_id());
241 smp_mb(); /* all activity before dead. */
242 this_cpu_write(cpu_dead_idle, true);
237 arch_cpu_idle_dead(); 243 arch_cpu_idle_dead();
244 }
238 245
239 local_irq_disable(); 246 local_irq_disable();
240 arch_cpu_idle_enter(); 247 arch_cpu_idle_enter();