aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2008-06-05 08:49:58 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-10 06:17:28 -0400
commit7def2be1dc679984f4c4fb3ef19a8a081b2454ec (patch)
tree5be15957919d095cdbbc9ed3217d9dec939b234b /kernel/sched.c
parente958b3600484533ff801920290468adc8135f89d (diff)
sched: fix hotplug cpus on ia64
Cliff Wickman wrote: > I built an ia64 kernel from Andrew's tree (2.6.26-rc2-mm1) > and get a very predictable hotplug cpu problem. > billberry1:/tmp/cpw # ./dis > disabled cpu 17 > enabled cpu 17 > billberry1:/tmp/cpw # ./dis > disabled cpu 17 > enabled cpu 17 > billberry1:/tmp/cpw # ./dis > > The script that disables the cpu always hangs (unkillable) > on the 3rd attempt. > > And a bit further: > The kstopmachine thread always sits on the run queue (real time) for about > 30 minutes before running. this fix solves some (but not all) issues between CPU hotplug and RT bandwidth throttling. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 727bdef7616..e9c24a12865 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7513,21 +7513,28 @@ int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls)
7513static int update_sched_domains(struct notifier_block *nfb, 7513static int update_sched_domains(struct notifier_block *nfb,
7514 unsigned long action, void *hcpu) 7514 unsigned long action, void *hcpu)
7515{ 7515{
7516 int cpu = (int)(long)hcpu;
7517
7516 switch (action) { 7518 switch (action) {
7517 case CPU_UP_PREPARE:
7518 case CPU_UP_PREPARE_FROZEN:
7519 case CPU_DOWN_PREPARE: 7519 case CPU_DOWN_PREPARE:
7520 case CPU_DOWN_PREPARE_FROZEN: 7520 case CPU_DOWN_PREPARE_FROZEN:
7521 disable_runtime(cpu_rq(cpu));
7522 /* fall-through */
7523 case CPU_UP_PREPARE:
7524 case CPU_UP_PREPARE_FROZEN:
7521 detach_destroy_domains(&cpu_online_map); 7525 detach_destroy_domains(&cpu_online_map);
7522 free_sched_domains(); 7526 free_sched_domains();
7523 return NOTIFY_OK; 7527 return NOTIFY_OK;
7524 7528
7525 case CPU_UP_CANCELED: 7529
7526 case CPU_UP_CANCELED_FROZEN:
7527 case CPU_DOWN_FAILED: 7530 case CPU_DOWN_FAILED:
7528 case CPU_DOWN_FAILED_FROZEN: 7531 case CPU_DOWN_FAILED_FROZEN:
7529 case CPU_ONLINE: 7532 case CPU_ONLINE:
7530 case CPU_ONLINE_FROZEN: 7533 case CPU_ONLINE_FROZEN:
7534 enable_runtime(cpu_rq(cpu));
7535 /* fall-through */
7536 case CPU_UP_CANCELED:
7537 case CPU_UP_CANCELED_FROZEN:
7531 case CPU_DEAD: 7538 case CPU_DEAD:
7532 case CPU_DEAD_FROZEN: 7539 case CPU_DEAD_FROZEN:
7533 /* 7540 /*