From: kfraser@localhost.localdomain Date: Tue, 15 Aug 2006 09:56:59 +0000 (+0100) Subject: [XEND] Apply the domain cpumask fully to every vcpu in the domain. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15710^2~107^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13451be1da714dc48351e091b02a984a25170eeb;p=xen.git [XEND] Apply the domain cpumask fully to every vcpu in the domain. Apply the domain cpumask to each vcpu rather than mapping vcpus to cpus in the list. This is more inline with the comments for the cpus parameter and also allows the credit scheduler to balance vcpus within the domain cpumask. Signed-off-by: Ryan Harper --- diff --git a/tools/python/xen/xend/XendDomainInfo.py b/tools/python/xen/xend/XendDomainInfo.py index 35a014900d..daedcff625 100644 --- a/tools/python/xen/xend/XendDomainInfo.py +++ b/tools/python/xen/xend/XendDomainInfo.py @@ -1272,12 +1272,9 @@ class XendDomainInfo: # repin domain vcpus if a restricted cpus list is provided # this is done prior to memory allocation to aide in memory # distribution for NUMA systems. - cpus = self.info['cpus'] - if cpus is not None and len(cpus) > 0: + if self.info['cpus'] is not None and len(self.info['cpus']) > 0: for v in range(0, self.info['max_vcpu_id']+1): - # pincpu takes a list of ints - cpu = [ int( cpus[v % len(cpus)] ) ] - xc.vcpu_setaffinity(self.domid, v, cpu) + xc.vcpu_setaffinity(self.domid, v, self.info['cpus']) # set domain maxmem in KiB xc.domain_setmaxmem(self.domid, self.info['maxmem'] * 1024)