mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	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
e761b77252 ("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>
			
			
This commit is contained in:
		
							parent
							
								
									ee79d1bdb6
								
							
						
					
					
						commit
						d65bd5ecb2
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
					@ -7774,17 +7774,21 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
 | 
				
			||||||
			     struct sched_domain_attr *dattr_new)
 | 
								     struct sched_domain_attr *dattr_new)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	int i, j, n;
 | 
						int i, j, n;
 | 
				
			||||||
 | 
						int new_topology;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	mutex_lock(&sched_domains_mutex);
 | 
						mutex_lock(&sched_domains_mutex);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* always unregister in case we don't destroy any domains */
 | 
						/* always unregister in case we don't destroy any domains */
 | 
				
			||||||
	unregister_sched_domain_sysctl();
 | 
						unregister_sched_domain_sysctl();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						/* Let architecture update cpu core mappings. */
 | 
				
			||||||
 | 
						new_topology = arch_update_cpu_topology();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	n = doms_new ? ndoms_new : 0;
 | 
						n = doms_new ? ndoms_new : 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Destroy deleted domains */
 | 
						/* Destroy deleted domains */
 | 
				
			||||||
	for (i = 0; i < ndoms_cur; i++) {
 | 
						for (i = 0; i < ndoms_cur; i++) {
 | 
				
			||||||
		for (j = 0; j < n; j++) {
 | 
							for (j = 0; j < n && !new_topology; j++) {
 | 
				
			||||||
			if (cpus_equal(doms_cur[i], doms_new[j])
 | 
								if (cpus_equal(doms_cur[i], doms_new[j])
 | 
				
			||||||
			    && dattrs_equal(dattr_cur, i, dattr_new, j))
 | 
								    && dattrs_equal(dattr_cur, i, dattr_new, j))
 | 
				
			||||||
				goto match1;
 | 
									goto match1;
 | 
				
			||||||
| 
						 | 
					@ -7804,7 +7808,7 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Build new domains */
 | 
						/* Build new domains */
 | 
				
			||||||
	for (i = 0; i < ndoms_new; i++) {
 | 
						for (i = 0; i < ndoms_new; i++) {
 | 
				
			||||||
		for (j = 0; j < ndoms_cur; j++) {
 | 
							for (j = 0; j < ndoms_cur && !new_topology; j++) {
 | 
				
			||||||
			if (cpus_equal(doms_new[i], doms_cur[j])
 | 
								if (cpus_equal(doms_new[i], doms_cur[j])
 | 
				
			||||||
			    && dattrs_equal(dattr_new, i, dattr_cur, j))
 | 
								    && dattrs_equal(dattr_new, i, dattr_cur, j))
 | 
				
			||||||
				goto match2;
 | 
									goto match2;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue