Merge "add check before adding cpus to cpuset_reserved" into stable/pike

This commit is contained in:
Zuul 2018-03-30 02:34:23 +00:00 committed by Gerrit Code Review
commit 2be50837c4
2 changed files with 4 additions and 4 deletions

View File

@ -3013,8 +3013,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
id=1, cpuset=set([2, 3]),
memory=1024, pagesize=2048,
cpu_policy=fields.CPUAllocationPolicy.DEDICATED,
cpu_pinning={2: 7, 3: 8},
cpuset_reserved=set([]))])
cpu_pinning={2: 7, 3: 8})])
instance_ref = objects.Instance(**self.test_instance)
instance_ref.numa_topology = instance_topology

View File

@ -4246,8 +4246,9 @@ class LibvirtDriver(driver.ComputeDriver):
else:
pin_cpuset.cpuset = host_cell.cpuset
if emulator_threads_isolated:
emupcpus.extend(
object_numa_cell.cpuset_reserved)
if object_numa_cell.cpuset_reserved:
emupcpus.extend(
object_numa_cell.cpuset_reserved)
elif not wants_realtime or cpu not in vcpus_rt:
# - If realtime IS NOT enabled, the
# emulator threads are allowed to float