]> xenbits.xensource.com Git - people/pauldu/xen.git/commitdiff
xen/cpupool: add cpu to sched_res_mask when removing it from cpupool
authorJuergen Gross <jgross@suse.com>
Wed, 2 Dec 2020 09:12:04 +0000 (10:12 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 2 Dec 2020 09:12:04 +0000 (10:12 +0100)
When a cpu is removed from a cpupool and added to the free cpus it
should be added to sched_res_mask, too.

The related removal from sched_res_mask in case of core scheduling
is already done in schedule_cpu_add().

As long as all cpupools share the same scheduling granularity there
is nothing going wrong with the missing addition, but this will change
when per-cpupool granularity is fully supported.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Dario Faggioli <dfaggioli@suse.com>
xen/common/sched/core.c

index ed973e90ecf37baa592e82f9ae29e166d1d3057d..f8c81592af32d8d6b23254fc242c00e48fe70d8e 100644 (file)
@@ -3189,6 +3189,7 @@ int schedule_cpu_rm(unsigned int cpu)
             /* Adjust cpu masks of resources (old and new). */
             cpumask_clear_cpu(cpu_iter, sr->cpus);
             cpumask_set_cpu(cpu_iter, sr_new[idx]->cpus);
+            cpumask_set_cpu(cpu_iter, &sched_res_mask);
 
             /* Init timer. */
             init_timer(&sr_new[idx]->s_timer, s_timer_fn, NULL, cpu_iter);