diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-11 12:18:56 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-11 12:18:56 -0400 |
| commit | 051a82fc0c450f6ca649acf684586477aa6d5c6a (patch) | |
| tree | 51ae5217559da84a1ea38e6db756a2c421fa3631 /kernel | |
| parent | 6c47d773e7d8f784996d9027f035379baa19ded7 (diff) | |
| parent | 08f503b0c089968b2542659a89dfd50c5c59bb0b (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched-devel:
keep rd->online and cpu_online_map in sync
Revert "cpu hotplug: adjust root-domain->online span in response to hotplug event"
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index b02e4fc256..1cb53fb1fe 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
| @@ -5813,13 +5813,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
| 5813 | /* Must be high prio: stop_machine expects to yield to it. */ | 5813 | /* Must be high prio: stop_machine expects to yield to it. */ |
| 5814 | rq = task_rq_lock(p, &flags); | 5814 | rq = task_rq_lock(p, &flags); |
| 5815 | __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); | 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 | |||
| 5823 | task_rq_unlock(rq, &flags); | 5816 | task_rq_unlock(rq, &flags); |
| 5824 | cpu_rq(cpu)->migration_thread = p; | 5817 | cpu_rq(cpu)->migration_thread = p; |
| 5825 | break; | 5818 | break; |
| @@ -5828,6 +5821,15 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
| 5828 | case CPU_ONLINE_FROZEN: | 5821 | case CPU_ONLINE_FROZEN: |
| 5829 | /* Strictly unnecessary, as first user will wake it. */ | 5822 | /* Strictly unnecessary, as first user will wake it. */ |
| 5830 | wake_up_process(cpu_rq(cpu)->migration_thread); | 5823 | wake_up_process(cpu_rq(cpu)->migration_thread); |
| 5824 | |||
| 5825 | /* Update our root-domain */ | ||
| 5826 | rq = cpu_rq(cpu); | ||
| 5827 | spin_lock_irqsave(&rq->lock, flags); | ||
| 5828 | if (rq->rd) { | ||
| 5829 | BUG_ON(!cpu_isset(cpu, rq->rd->span)); | ||
| 5830 | cpu_set(cpu, rq->rd->online); | ||
| 5831 | } | ||
| 5832 | spin_unlock_irqrestore(&rq->lock, flags); | ||
| 5831 | break; | 5833 | break; |
| 5832 | 5834 | ||
| 5833 | #ifdef CONFIG_HOTPLUG_CPU | 5835 | #ifdef CONFIG_HOTPLUG_CPU |
| @@ -5879,7 +5881,8 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
| 5879 | spin_unlock_irq(&rq->lock); | 5881 | spin_unlock_irq(&rq->lock); |
| 5880 | break; | 5882 | break; |
| 5881 | 5883 | ||
| 5882 | case CPU_DOWN_PREPARE: | 5884 | case CPU_DYING: |
| 5885 | case CPU_DYING_FROZEN: | ||
| 5883 | /* Update our root-domain */ | 5886 | /* Update our root-domain */ |
| 5884 | rq = cpu_rq(cpu); | 5887 | rq = cpu_rq(cpu); |
| 5885 | spin_lock_irqsave(&rq->lock, flags); | 5888 | spin_lock_irqsave(&rq->lock, flags); |
| @@ -6103,6 +6106,8 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd) | |||
| 6103 | rq->rd = rd; | 6106 | rq->rd = rd; |
| 6104 | 6107 | ||
| 6105 | cpu_set(rq->cpu, rd->span); | 6108 | cpu_set(rq->cpu, rd->span); |
| 6109 | if (cpu_isset(rq->cpu, cpu_online_map)) | ||
| 6110 | cpu_set(rq->cpu, rd->online); | ||
| 6106 | 6111 | ||
| 6107 | for (class = sched_class_highest; class; class = class->next) { | 6112 | for (class = sched_class_highest; class; class = class->next) { |
| 6108 | if (class->join_domain) | 6113 | if (class->join_domain) |
