[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen master] xen/cpupool: add cpu to sched_res_mask when removing it from cpupool



commit 9f5ce6e5953456d499e05b48db1de5724d4b09de
Author:     Juergen Gross <jgross@xxxxxxxx>
AuthorDate: Wed Dec 2 10:12:04 2020 +0100
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Dec 2 10:12:04 2020 +0100

    xen/cpupool: add cpu to sched_res_mask when removing it from cpupool
    
    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@xxxxxxxx>
    Reviewed-by: Dario Faggioli <dfaggioli@xxxxxxxx>
---
 xen/common/sched/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/common/sched/core.c b/xen/common/sched/core.c
index ed973e90ec..f8c81592af 100644
--- a/xen/common/sched/core.c
+++ b/xen/common/sched/core.c
@@ -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);
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.