On 25/07/16 16:28, George Dunlap wrote:
> The initial placement algorithm sometimes picks cpus outside of the
> mask it's given, does a lot of unnecessary bitmasking, does its own
> separate load calculation, and completely ignores vcpu hard and soft
> affinities.  Just get rid of it and rely on the schedulers to do
> initial placement.
>
> Signed-off-by: George Dunlap <george.dun...@citrix.com>
> ---
> v2:
> - Use cpumask_any() to avoid a bias towards low pcpus on schedulers
> that prefer to leave the cpu where it is.
>
> The core problem with default_vcpu0_location() is that it chooses its
> initial cpu based on the sibling of pcpu 0, not the first available
> sibling in the online mask; so if pcpu 1 ends up being less "busy"
> than all the cpus in the pool, then it ends up being chosen even
> though it's not in the pool.
>
> Fixing the algorithm would involve starting with the sibling map of
> cpumask_first(online) rather than 0, and then having all sibling
> checks not only test that the result of cpumask_next() < nr_cpu_ids,
> but that the result is in online.
>
> Additionally, as far as I can tell, the cpumask_test_cpu(i,
> &cpu_exclude_map) at the top of the for_each_cpu() loop can never
> return false; and this both this test and the cpumask_or() are
> unnecessary and should be removed.
>
> CC: Dario Faggioli <dario.faggi...@citrix.com>
> CC: Anshul Makkar <anshul.mak...@citrix.com>
> CC: Meng Xu <men...@cis.upenn.edu>
> CC: Andrew Cooper <andrew.coop...@citrix.com>
> CC: Ian Jackson <ian.jack...@eu.citrix.com>
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
> CC: Stefano Stabellini <sstabell...@kernel.org>
> CC: Tim Deegan <t...@xen.org>
> CC: Wei Liu <wei.l...@citrix.com>

Acked-by: Andrew Cooper <andrew.coop...@citrix.com> from a REST point of
view. 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to