Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpu hotplug: adjust root-domain->online span in response to hotplug event

We currently set the root-domain online span automatically when the
domain is added to the cpu if the cpu is already a member of
cpu_online_map.

This was done as a hack/bug-fix for s2ram, but it also causes a problem
with hotplug CPU_DOWN transitioning. The right way to fix the original
problem is to actually respond to CPU_UP events, instead of CPU_ONLINE,
which is already too late.

This solves the hung reboot regression reported by Andrew Morton and
others.

Signed-off-by: Gregory Haskins <ghaskins@novell.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Gregory Haskins and committed by
Linus Torvalds
393d94d9 6efcae46

+7 -11
+7 -11
kernel/sched.c
··· 5813 5813 /* Must be high prio: stop_machine expects to yield to it. */ 5814 5814 rq = task_rq_lock(p, &flags); 5815 5815 __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); 5816 + 5817 + /* Update our root-domain */ 5818 + if (rq->rd) { 5819 + BUG_ON(!cpu_isset(cpu, rq->rd->span)); 5820 + cpu_set(cpu, rq->rd->online); 5821 + } 5822 + 5816 5823 task_rq_unlock(rq, &flags); 5817 5824 cpu_rq(cpu)->migration_thread = p; 5818 5825 break; ··· 5828 5821 case CPU_ONLINE_FROZEN: 5829 5822 /* Strictly unnecessary, as first user will wake it. */ 5830 5823 wake_up_process(cpu_rq(cpu)->migration_thread); 5831 - 5832 - /* Update our root-domain */ 5833 - rq = cpu_rq(cpu); 5834 - spin_lock_irqsave(&rq->lock, flags); 5835 - if (rq->rd) { 5836 - BUG_ON(!cpu_isset(cpu, rq->rd->span)); 5837 - cpu_set(cpu, rq->rd->online); 5838 - } 5839 - spin_unlock_irqrestore(&rq->lock, flags); 5840 5824 break; 5841 5825 5842 5826 #ifdef CONFIG_HOTPLUG_CPU ··· 6103 6105 rq->rd = rd; 6104 6106 6105 6107 cpu_set(rq->cpu, rd->span); 6106 - if (cpu_isset(rq->cpu, cpu_online_map)) 6107 - cpu_set(rq->cpu, rd->online); 6108 6108 6109 6109 for (class = sched_class_highest; class; class = class->next) { 6110 6110 if (class->join_domain)