[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH] x86: make "dom0_nodes=" work with credit2
Apart from setting the affinities, vCPU-s / units also need to be migrated off of CPUs which aren't part of the affinity. Otherwise, for a reason I haven't been able to determine, credit2 won't actually schedule them, resulting in the Dom0 boot process to hang (either right away or when bringing up "secondary" vCPU-s). Fixes: dafd936ddd ("Make credit2 the default scheduler") Reported-by: Olaf Hering <ohering@xxxxxxx> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- The Fixes: tag isn't very precise - it's rather the commit exposing the issue by default. I haven't been able to identify the actual commit which did introduce the problem; it may well be that it has always been there since the introduction of credit2. Credit2 moving the vCPU-s off of their initially assigned ones right away of course renders sched_select_initial_cpu()'s use of cpu_cycle() pretty useless. But I guess that's still useful for other schedulers. I wonder though whether sched_init_vcpu() shouldn't use the CPU map calculated by sched_select_initial_cpu() for its call to sched_set_affinity() in the non-pinned case, rather than setting "all". (I guess doing so might mask the issue at hand, but I think the change here would still be applicable at least from an abstract pov.) --- a/xen/common/sched/core.c +++ b/xen/common/sched/core.c @@ -3403,9 +3403,15 @@ void __init sched_setup_dom0_vcpus(struc { for_each_sched_unit ( d, unit ) { + spinlock_t *lock = unit_schedule_lock_irq(unit); + if ( !opt_dom0_vcpus_pin && !dom0_affinity_relaxed ) sched_set_affinity(unit, &dom0_cpus, NULL); sched_set_affinity(unit, NULL, &dom0_cpus); + + sched_unit_migrate_start(unit); + unit_schedule_unlock_irq(lock, unit); + sched_unit_migrate_finish(unit); } }
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |