Merge "numa: Fixes NUMA topology related unit tests"
This commit is contained in:
commit
dfb2af0f8e
@ -743,8 +743,8 @@ def _pack_instance_onto_cores(available_siblings,
|
|||||||
|
|
||||||
usable_cores = map(lambda s: list(s)[:threads_no], sibling_set)
|
usable_cores = map(lambda s: list(s)[:threads_no], sibling_set)
|
||||||
|
|
||||||
return zip(sorted(instance_cores),
|
return list(zip(sorted(instance_cores),
|
||||||
itertools.chain(*usable_cores))
|
itertools.chain(*usable_cores)))
|
||||||
|
|
||||||
if (instance_cell.cpu_thread_policy ==
|
if (instance_cell.cpu_thread_policy ==
|
||||||
fields.CPUThreadAllocationPolicy.REQUIRE):
|
fields.CPUThreadAllocationPolicy.REQUIRE):
|
||||||
@ -801,8 +801,8 @@ def _pack_instance_onto_cores(available_siblings,
|
|||||||
if (instance_cell.cpu_thread_policy !=
|
if (instance_cell.cpu_thread_policy !=
|
||||||
fields.CPUThreadAllocationPolicy.REQUIRE and
|
fields.CPUThreadAllocationPolicy.REQUIRE and
|
||||||
not pinning):
|
not pinning):
|
||||||
pinning = zip(sorted(instance_cell.cpuset),
|
pinning = list(zip(sorted(instance_cell.cpuset),
|
||||||
itertools.chain(*sibling_set))
|
itertools.chain(*sibling_set)))
|
||||||
|
|
||||||
threads_no = _threads(instance_cell, threads_no)
|
threads_no = _threads(instance_cell, threads_no)
|
||||||
|
|
||||||
@ -810,7 +810,7 @@ def _pack_instance_onto_cores(available_siblings,
|
|||||||
return
|
return
|
||||||
|
|
||||||
topology = objects.VirtCPUTopology(sockets=1,
|
topology = objects.VirtCPUTopology(sockets=1,
|
||||||
cores=len(pinning) / threads_no,
|
cores=len(pinning) // threads_no,
|
||||||
threads=threads_no)
|
threads=threads_no)
|
||||||
instance_cell.pin_vcpus(*pinning)
|
instance_cell.pin_vcpus(*pinning)
|
||||||
instance_cell.cpu_topology = topology
|
instance_cell.cpu_topology = topology
|
||||||
|
@ -64,8 +64,6 @@ nova.tests.unit.virt.libvirt.test_imagebackend.RbdTestCase
|
|||||||
nova.tests.unit.virt.libvirt.test_imagecache.ImageCacheManagerTestCase
|
nova.tests.unit.virt.libvirt.test_imagecache.ImageCacheManagerTestCase
|
||||||
nova.tests.unit.virt.libvirt.test_imagecache.VerifyChecksumTestCase
|
nova.tests.unit.virt.libvirt.test_imagecache.VerifyChecksumTestCase
|
||||||
nova.tests.unit.virt.libvirt.test_vif.LibvirtVifTestCase
|
nova.tests.unit.virt.libvirt.test_vif.LibvirtVifTestCase
|
||||||
nova.tests.unit.virt.test_hardware.CPUPinningCellTestCase
|
|
||||||
nova.tests.unit.virt.test_hardware.CPUPinningTestCase
|
|
||||||
nova.tests.unit.virt.test_virt_drivers.FakeConnectionTestCase
|
nova.tests.unit.virt.test_virt_drivers.FakeConnectionTestCase
|
||||||
nova.tests.unit.virt.test_virt_drivers.LibvirtConnTestCase
|
nova.tests.unit.virt.test_virt_drivers.LibvirtConnTestCase
|
||||||
nova.tests.unit.virt.vmwareapi.test_images.VMwareImagesTestCase
|
nova.tests.unit.virt.vmwareapi.test_images.VMwareImagesTestCase
|
||||||
|
Loading…
Reference in New Issue
Block a user