aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2008-12-09 12:49:51 -0500
committerIngo Molnar <mingo@elte.hu>2008-12-12 07:47:22 -0500
commitd65bd5ecb2bd166cea4952a59b7e16cc3ad6ef6c (patch)
tree073c1da2f89dff262ace1aa90af3b6a1a48d4a33 /kernel
parentee79d1bdb6a10499e53f80b1e8d14110215178ba (diff)
sched: add missing arch_update_cpu_topology() call
arch_reinit_sched_domains() used to call arch_update_cpu_topology() via arch_init_sched_domains(). This call got lost with e761b7725234276a802322549cee5255305a0930 ("cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2)". So we might end up with outdated and missing cpus in the cpu core maps (architecture used to call arch_reinit_sched_domains if cpu topology changed). This adds a call to arch_update_cpu_topology in partition_sched_domains which gets called whenever scheduling domains get updated. Which is what is supposed to happen when cpu topology changes. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index fcfbbd9dbd60..ad7b93be5691 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7774,17 +7774,21 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
7774 struct sched_domain_attr *dattr_new) 7774 struct sched_domain_attr *dattr_new)
7775{ 7775{
7776 int i, j, n; 7776 int i, j, n;
7777 int new_topology;
7777 7778
7778 mutex_lock(&sched_domains_mutex); 7779 mutex_lock(&sched_domains_mutex);
7779 7780
7780 /* always unregister in case we don't destroy any domains */ 7781 /* always unregister in case we don't destroy any domains */
7781 unregister_sched_domain_sysctl(); 7782 unregister_sched_domain_sysctl();
7782 7783
7784 /* Let architecture update cpu core mappings. */
7785 new_topology = arch_update_cpu_topology();
7786
7783 n = doms_new ? ndoms_new : 0; 7787 n = doms_new ? ndoms_new : 0;
7784 7788
7785 /* Destroy deleted domains */ 7789 /* Destroy deleted domains */
7786 for (i = 0; i < ndoms_cur; i++) { 7790 for (i = 0; i < ndoms_cur; i++) {
7787 for (j = 0; j < n; j++) { 7791 for (j = 0; j < n && !new_topology; j++) {
7788 if (cpus_equal(doms_cur[i], doms_new[j]) 7792 if (cpus_equal(doms_cur[i], doms_new[j])
7789 && dattrs_equal(dattr_cur, i, dattr_new, j)) 7793 && dattrs_equal(dattr_cur, i, dattr_new, j))
7790 goto match1; 7794 goto match1;
@@ -7804,7 +7808,7 @@ match1:
7804 7808
7805 /* Build new domains */ 7809 /* Build new domains */
7806 for (i = 0; i < ndoms_new; i++) { 7810 for (i = 0; i < ndoms_new; i++) {
7807 for (j = 0; j < ndoms_cur; j++) { 7811 for (j = 0; j < ndoms_cur && !new_topology; j++) {
7808 if (cpus_equal(doms_new[i], doms_cur[j]) 7812 if (cpus_equal(doms_new[i], doms_cur[j])
7809 && dattrs_equal(dattr_new, i, dattr_cur, j)) 7813 && dattrs_equal(dattr_new, i, dattr_cur, j))
7810 goto match2; 7814 goto match2;