From dd3018002d10909aa129f036f1b3d8499189f508 Mon Sep 17 00:00:00 2001 From: Gregory Haskins Date: Sat, 8 Mar 2008 00:10:15 -0500 Subject: [PATCH] --- yaml --- r: 87059 b: refs/heads/master c: 393d94d98b19089ec172566e23557997931b137e h: refs/heads/master i: 87057: 158eeefb1989b50eadc74575efcf5a36a6b2cfac 87055: 8cf07fcbad0d2e456600cab4dc10f8849d0009a1 v: v3 --- [refs] | 2 +- trunk/kernel/sched.c | 18 +++++++----------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 18241cb79a33..0b18e9106352 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6efcae460186c0c1c94afff58a92784e1fc0d10b +refs/heads/master: 393d94d98b19089ec172566e23557997931b137e diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 52b98675acb2..b02e4fc25645 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -5813,6 +5813,13 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) /* Must be high prio: stop_machine expects to yield to it. */ rq = task_rq_lock(p, &flags); __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); + + /* Update our root-domain */ + if (rq->rd) { + BUG_ON(!cpu_isset(cpu, rq->rd->span)); + cpu_set(cpu, rq->rd->online); + } + task_rq_unlock(rq, &flags); cpu_rq(cpu)->migration_thread = p; break; @@ -5821,15 +5828,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) case CPU_ONLINE_FROZEN: /* Strictly unnecessary, as first user will wake it. */ wake_up_process(cpu_rq(cpu)->migration_thread); - - /* Update our root-domain */ - rq = cpu_rq(cpu); - spin_lock_irqsave(&rq->lock, flags); - if (rq->rd) { - BUG_ON(!cpu_isset(cpu, rq->rd->span)); - cpu_set(cpu, rq->rd->online); - } - spin_unlock_irqrestore(&rq->lock, flags); break; #ifdef CONFIG_HOTPLUG_CPU @@ -6105,8 +6103,6 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd) rq->rd = rd; cpu_set(rq->cpu, rd->span); - if (cpu_isset(rq->cpu, cpu_online_map)) - cpu_set(rq->cpu, rd->online); for (class = sched_class_highest; class; class = class->next) { if (class->join_domain)