aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-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;