objects: Add 'NUMACell.pcpuset' field
We will use this to track host CPUs intended for dedicated workloads in a future change. For now, we simply add the field and set it in all instances of 'NUMACell'. This change has the benefit of allowing us to avoid overloading the meaning of some fields, as described below. This doesn't happen here but rather with change I492803eaacc34c69af073689f9159449557919db. Before: pinned instances -> NUMACell.cpuset Tracks the host cores that can be used by pinned instances NUMACell.cpu_usage Tracks the usage of host cores by pinned instances in total integer format NUMACell.pinned_cpus Tracks the usage of host cores by pinned instances in mapping format unpinned instances -> NUMACell.cpuset Tracks the host cores that can be used by unpinned instances NUMACell.cpu_usage Tracks the usage of host cores by unpinned instances in total integer format After: pinned instances -> NUMACell.pcpuset Tracks the host cores that can be used by pinned instances NUMACell.pinned_cpus Tracks the usage of host cores by pinned instances in mapping format unpinned instances -> NUMACell.cpuset Tracks the host cores that can be used by unpinned instances NUMACell.cpu_usage Tracks the usage of host cores by unpinned instances in total integer format In summary, we go from overloading the 'cpuset' and 'cpu_usage' fields to having dedicated fields for pinned and unpinned CPUs. As an aside, it would be nice if the field names were a little more uniform, but that can be addressed in the future. Change-Id: I7407a8e662d7b4a710d5a133ef22d2b25e26ad89 Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
This commit is contained in:
parent
f329ee5a3b
commit
1ecb141da1
|
@ -44,11 +44,13 @@ class NUMACell(base.NovaObject):
|
|||
# Version 1.1: Added pinned_cpus and siblings fields
|
||||
# Version 1.2: Added mempages field
|
||||
# Version 1.3: Add network_metadata field
|
||||
VERSION = '1.3'
|
||||
# Version 1.4: Add pcpuset
|
||||
VERSION = '1.4'
|
||||
|
||||
fields = {
|
||||
'id': obj_fields.IntegerField(read_only=True),
|
||||
'cpuset': obj_fields.SetOfIntegersField(),
|
||||
'pcpuset': obj_fields.SetOfIntegersField(),
|
||||
'memory': obj_fields.IntegerField(),
|
||||
'cpu_usage': obj_fields.IntegerField(default=0),
|
||||
'memory_usage': obj_fields.IntegerField(default=0),
|
||||
|
@ -61,6 +63,8 @@ class NUMACell(base.NovaObject):
|
|||
def obj_make_compatible(self, primitive, target_version):
|
||||
super(NUMACell, self).obj_make_compatible(primitive, target_version)
|
||||
target_version = versionutils.convert_version_to_tuple(target_version)
|
||||
if target_version < (1, 4):
|
||||
primitive.pop('pcpuset', None)
|
||||
if target_version < (1, 3):
|
||||
primitive.pop('network_metadata', None)
|
||||
|
||||
|
|
|
@ -135,6 +135,7 @@ class ClaimTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
memory_usage=0, cpu_usage=0,
|
||||
mempages=[],
|
||||
|
@ -143,6 +144,7 @@ class ClaimTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
memory_usage=0,
|
||||
cpu_usage=0,
|
||||
|
|
|
@ -5702,6 +5702,7 @@ class ComputeTestCase(BaseTestCase,
|
|||
cell1 = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
pagesize=2048,
|
||||
cpu_usage=2,
|
||||
|
@ -5715,6 +5716,7 @@ class ComputeTestCase(BaseTestCase,
|
|||
cell2 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
pinned_cpus=set(),
|
||||
memory=512,
|
||||
pagesize=2048,
|
||||
|
|
|
@ -170,6 +170,7 @@ _NUMA_HOST_TOPOLOGIES = {
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=_2MB,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -179,6 +180,7 @@ _NUMA_HOST_TOPOLOGIES = {
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=_2MB,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -2034,7 +2036,8 @@ class TestInstanceClaim(BaseTestCase):
|
|||
self.instance = _INSTANCE_FIXTURES[0].obj_clone()
|
||||
|
||||
def assertEqualNUMAHostTopology(self, expected, got):
|
||||
attrs = ('cpuset', 'memory', 'id', 'cpu_usage', 'memory_usage')
|
||||
attrs = ('cpuset', 'pcpuset', 'memory', 'id', 'cpu_usage',
|
||||
'memory_usage')
|
||||
if None in (expected, got):
|
||||
if expected != got:
|
||||
raise AssertionError("Topologies don't match. Expected: "
|
||||
|
|
|
@ -44,6 +44,7 @@ fake_numa_topology = objects.NUMATopology(cells=[
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -53,6 +54,7 @@ fake_numa_topology = objects.NUMATopology(cells=[
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
|
|
@ -21,6 +21,7 @@ fake_obj_numa = objects.NUMATopology(cells=[
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=2,
|
||||
memory_usage=256,
|
||||
|
@ -30,6 +31,7 @@ fake_obj_numa = objects.NUMATopology(cells=[
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=1,
|
||||
memory_usage=128,
|
||||
|
@ -44,6 +46,7 @@ class _TestNUMACell(object):
|
|||
cell_a = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=2,
|
||||
memory_usage=256,
|
||||
|
@ -53,6 +56,7 @@ class _TestNUMACell(object):
|
|||
cell_b = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=1,
|
||||
memory_usage=128,
|
||||
|
@ -67,6 +71,7 @@ class _TestNUMACell(object):
|
|||
numacell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2, 3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=2,
|
||||
memory_usage=256,
|
||||
|
@ -100,6 +105,7 @@ class _TestNUMACell(object):
|
|||
numacell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2, 3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=2,
|
||||
memory_usage=256,
|
||||
|
@ -128,6 +134,7 @@ class _TestNUMACell(object):
|
|||
numacell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2, 3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=256,
|
||||
|
@ -152,6 +159,7 @@ class _TestNUMACell(object):
|
|||
cell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=1024,
|
||||
siblings=[set([1]), set([2])],
|
||||
pinned_cpus=set(),
|
||||
|
@ -187,6 +195,7 @@ class _TestNUMACell(object):
|
|||
cell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=1024,
|
||||
siblings=[set([1]), set([2])],
|
||||
pinned_cpus=set(),
|
||||
|
@ -212,6 +221,7 @@ class _TestNUMACell(object):
|
|||
cell1 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -219,6 +229,7 @@ class _TestNUMACell(object):
|
|||
cell2 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -229,6 +240,7 @@ class _TestNUMACell(object):
|
|||
cell1 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -236,6 +248,7 @@ class _TestNUMACell(object):
|
|||
cell2 = objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -246,12 +259,14 @@ class _TestNUMACell(object):
|
|||
cell1 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
pinned_cpus=set([3, 4]),
|
||||
siblings=[set([5, 6])])
|
||||
cell2 = objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -262,6 +277,7 @@ class _TestNUMACell(object):
|
|||
cell1 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -269,6 +285,7 @@ class _TestNUMACell(object):
|
|||
cell2 = objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
pinned_cpus=set([3, 4]),
|
||||
siblings=[set([5, 6])])
|
||||
|
@ -280,6 +297,7 @@ class _TestNUMACell(object):
|
|||
cell1 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -288,6 +306,7 @@ class _TestNUMACell(object):
|
|||
cell2 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -301,6 +320,7 @@ class _TestNUMACell(object):
|
|||
cell1 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -309,6 +329,7 @@ class _TestNUMACell(object):
|
|||
cell2 = objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -322,6 +343,7 @@ class _TestNUMACell(object):
|
|||
cell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set([3, 4]),
|
||||
memory=32,
|
||||
cpu_usage=10,
|
||||
pinned_cpus=set([3, 4]),
|
||||
|
@ -329,8 +351,14 @@ class _TestNUMACell(object):
|
|||
network_metadata=network_metadata)
|
||||
|
||||
versions = ovo_base.obj_tree_get_versions('NUMACell')
|
||||
|
||||
primitive = cell.obj_to_primitive(target_version='1.4',
|
||||
version_manifest=versions)
|
||||
self.assertIn('pcpuset', primitive['nova_object.data'])
|
||||
|
||||
primitive = cell.obj_to_primitive(target_version='1.3',
|
||||
version_manifest=versions)
|
||||
self.assertNotIn('pcpuset', primitive['nova_object.data'])
|
||||
self.assertIn('network_metadata', primitive['nova_object.data'])
|
||||
|
||||
primitive = cell.obj_to_primitive(target_version='1.2',
|
||||
|
|
|
@ -1100,7 +1100,7 @@ object_data = {
|
|||
'MigrationList': '1.4-983a9c29d4f1e747ce719dc9063b729b',
|
||||
'MonitorMetric': '1.1-53b1db7c4ae2c531db79761e7acc52ba',
|
||||
'MonitorMetricList': '1.1-15ecf022a68ddbb8c2a6739cfc9f8f5e',
|
||||
'NUMACell': '1.3-64b5fec7c51c0a85760c56b42dd307a5',
|
||||
'NUMACell': '1.4-7695303e820fa855d76954be2eb2680e',
|
||||
'NUMAPagesTopology': '1.1-edab9fa2dc43c117a38d600be54b4542',
|
||||
'NUMATopology': '1.2-c63fad38be73b6afd04715c9c1b29220',
|
||||
'NUMATopologyLimits': '1.1-4235c5da7a76c7e36075f0cd2f5cf922',
|
||||
|
|
|
@ -29,6 +29,7 @@ NUMA_TOPOLOGY = objects.NUMATopology(cells=[
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -40,6 +41,7 @@ NUMA_TOPOLOGY = objects.NUMATopology(cells=[
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -54,6 +56,7 @@ NUMA_TOPOLOGIES_W_HT = [
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2, 5, 6]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -63,6 +66,7 @@ NUMA_TOPOLOGIES_W_HT = [
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4, 7, 8]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -74,6 +78,7 @@ NUMA_TOPOLOGIES_W_HT = [
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set(),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -83,6 +88,7 @@ NUMA_TOPOLOGIES_W_HT = [
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2, 5, 6]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -92,6 +98,7 @@ NUMA_TOPOLOGIES_W_HT = [
|
|||
objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([3, 4, 7, 8]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
|
|
@ -197,7 +197,6 @@ class TestNUMATopologyFilter(test.NoDBTestCase):
|
|||
|
||||
def test_numa_topology_filter_pass_cpu_thread_policy_others(self):
|
||||
cpu_policy = fields.CPUAllocationPolicy.DEDICATED
|
||||
cpu_thread_policy = fields.CPUThreadAllocationPolicy.PREFER
|
||||
numa_topology = fakes.NUMA_TOPOLOGY
|
||||
|
||||
for cpu_thread_policy in [
|
||||
|
@ -244,6 +243,7 @@ class TestNUMATopologyFilter(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=2,
|
||||
memory_usage=2048,
|
||||
|
@ -254,6 +254,7 @@ class TestNUMATopologyFilter(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=2,
|
||||
memory_usage=2048,
|
||||
|
|
|
@ -2847,6 +2847,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
|
|||
objects.NUMACell(
|
||||
id=3,
|
||||
cpuset=set([1]),
|
||||
pcpuset=set(),
|
||||
siblings=[set([1])],
|
||||
memory=1024,
|
||||
mempages=[
|
||||
|
@ -2877,6 +2878,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
|
|||
objects.NUMACell(
|
||||
id=3,
|
||||
cpuset=set([1]),
|
||||
pcpuset=set(),
|
||||
siblings=[set([1])],
|
||||
memory=1024,
|
||||
mempages=[
|
||||
|
@ -3169,6 +3171,7 @@ class LibvirtConnTestCase(test.NoDBTestCase,
|
|||
objects.NUMACell(
|
||||
id=3,
|
||||
cpuset=set([1]),
|
||||
pcpuset=set(),
|
||||
siblings=[set([1])],
|
||||
memory=1024,
|
||||
mempages=[
|
||||
|
@ -4047,18 +4050,21 @@ class LibvirtConnTestCase(test.NoDBTestCase,
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
siblings=[set([1]), set([2])],
|
||||
memory=1024,
|
||||
mempages=[]),
|
||||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
siblings=[set([3]), set([4])],
|
||||
memory=1024,
|
||||
mempages=[]),
|
||||
objects.NUMACell(
|
||||
id=16,
|
||||
cpuset=set([5, 6]),
|
||||
pcpuset=set(),
|
||||
siblings=[set([5]), set([6])],
|
||||
memory=1024,
|
||||
mempages=[])])
|
||||
|
@ -19414,6 +19420,7 @@ class HostStateTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=1024,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -19423,6 +19430,7 @@ class HostStateTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=1024,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
|
|
@ -1370,6 +1370,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=256,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1382,6 +1383,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([4, 6]),
|
||||
pcpuset=set(),
|
||||
memory=256,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1394,6 +1396,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([5, 7]),
|
||||
pcpuset=set(),
|
||||
memory=2,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1470,6 +1473,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=160,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1509,6 +1513,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=1024,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1519,6 +1524,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=5,
|
||||
cpuset=set([4, 6]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1529,6 +1535,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=6,
|
||||
cpuset=set([5, 7]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1590,6 +1597,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=1024,
|
||||
cpu_usage=2,
|
||||
memory_usage=512,
|
||||
|
@ -1600,6 +1608,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([4, 6]),
|
||||
pcpuset=set(),
|
||||
memory=512,
|
||||
cpu_usage=1,
|
||||
memory_usage=512,
|
||||
|
@ -1610,6 +1619,7 @@ class NUMATopologyTest(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([5, 7]),
|
||||
pcpuset=set(),
|
||||
memory=256,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -1928,6 +1938,7 @@ class VirtNUMAHostTopologyTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=2,
|
||||
memory_usage=2048,
|
||||
|
@ -1937,6 +1948,7 @@ class VirtNUMAHostTopologyTestCase(test.NoDBTestCase):
|
|||
siblings=[set([1]), set([2])]),
|
||||
objects.NUMACell(id=2,
|
||||
cpuset=set([3, 4]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=2,
|
||||
memory_usage=2048,
|
||||
|
@ -2151,6 +2163,7 @@ class VirtMemoryPagesTestCase(test.NoDBTestCase):
|
|||
hostcell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0]),
|
||||
pcpuset=set(),
|
||||
memory=1024,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -2388,6 +2401,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2404,6 +2418,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=1024,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2419,6 +2434,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0]),
|
||||
|
@ -2435,6 +2451,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2454,6 +2471,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([1]),
|
||||
|
@ -2471,6 +2489,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2491,6 +2510,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
siblings=[set([0, 1]), set([2, 3])],
|
||||
|
@ -2511,6 +2531,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2531,6 +2552,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([1, 2, 5, 6]),
|
||||
|
@ -2550,6 +2572,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2569,6 +2592,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2587,6 +2611,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set(range(0, 8)),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2604,6 +2629,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0, 1, 2]),
|
||||
|
@ -2621,6 +2647,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2640,6 +2667,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0, 1]),
|
||||
|
@ -2659,6 +2687,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2675,6 +2704,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2691,6 +2721,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0, 2, 5]),
|
||||
|
@ -2707,6 +2738,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0, 1, 2, 5]),
|
||||
|
@ -2723,6 +2755,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0, 2, 5, 6]),
|
||||
|
@ -2740,6 +2773,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
15]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2758,6 +2792,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([1]),
|
||||
|
@ -2775,6 +2810,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([1, 2]),
|
||||
|
@ -2792,6 +2828,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2811,6 +2848,7 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2828,13 +2866,14 @@ class CPUPinningCellTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
|
||||
def test_get_pinning_isolate_policy_fits_w_usage(self):
|
||||
host_pin = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0, 1]),
|
||||
siblings=[set([0, 4]), set([1, 5]), set([2, 6]), set([3, 7])],
|
||||
mempages=[])
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0, 1]),
|
||||
siblings=[set([0, 4]), set([1, 5]), set([2, 6]), set([3, 7])],
|
||||
mempages=[])
|
||||
inst_pin = objects.InstanceNUMACell(
|
||||
cpuset=set([0, 1]),
|
||||
memory=2048,
|
||||
|
@ -2852,6 +2891,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2860,6 +2900,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2881,6 +2922,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0]),
|
||||
|
@ -2889,6 +2931,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2910,6 +2953,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0]),
|
||||
|
@ -2918,6 +2962,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([2]),
|
||||
|
@ -2937,6 +2982,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2945,6 +2991,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -2968,6 +3015,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0]),
|
||||
|
@ -2976,6 +3024,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([4, 5, 6]),
|
||||
|
@ -2984,6 +3033,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=2,
|
||||
cpuset=set([8, 9, 10, 11]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([10, 11]),
|
||||
|
@ -3008,6 +3058,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([0]),
|
||||
|
@ -3016,6 +3067,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set([4, 5, 6]),
|
||||
|
@ -3037,6 +3089,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -3045,6 +3098,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([4, 5, 6, 7]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -3069,6 +3123,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3097,6 +3152,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3124,6 +3180,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3151,6 +3208,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3176,6 +3234,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3201,6 +3260,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3226,6 +3286,7 @@ class CPUPinningTestCase(test.NoDBTestCase, _CPUPinningTestCaseBase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=4096,
|
||||
cpu_usage=4,
|
||||
memory_usage=0,
|
||||
|
@ -3252,6 +3313,7 @@ class CPUSReservedCellTestCase(test.NoDBTestCase):
|
|||
host_cell = objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
memory_usage=0,
|
||||
pinned_cpus=set(),
|
||||
|
@ -3318,6 +3380,7 @@ class EmulatorThreadsTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3328,6 +3391,7 @@ class EmulatorThreadsTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=1,
|
||||
cpuset=set([2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3500,6 +3564,7 @@ class EmulatorThreadsTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3526,6 +3591,7 @@ class EmulatorThreadsTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([0, 1, 2, 3, 4, 5]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3560,6 +3626,7 @@ class EmulatorThreadsTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2, 3]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
@ -3584,6 +3651,7 @@ class EmulatorThreadsTestCase(test.NoDBTestCase):
|
|||
objects.NUMACell(
|
||||
id=0,
|
||||
cpuset=set([1, 2, 3, 4, 5]),
|
||||
pcpuset=set(),
|
||||
memory=2048,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
|
|
|
@ -2031,9 +2031,15 @@ def numa_usage_from_instance_numa(host_topology, instance_topology,
|
|||
cpu_usage = host_cell.cpu_usage
|
||||
|
||||
new_cell = objects.NUMACell(
|
||||
id=host_cell.id, cpuset=host_cell.cpuset, memory=host_cell.memory,
|
||||
cpu_usage=0, memory_usage=0, mempages=host_cell.mempages,
|
||||
pinned_cpus=host_cell.pinned_cpus, siblings=host_cell.siblings)
|
||||
id=host_cell.id,
|
||||
cpuset=host_cell.cpuset,
|
||||
pcpuset=set(), # TODO(stephenfin): Start setting this
|
||||
memory=host_cell.memory,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
mempages=host_cell.mempages,
|
||||
pinned_cpus=host_cell.pinned_cpus,
|
||||
siblings=host_cell.siblings)
|
||||
|
||||
if 'network_metadata' in host_cell:
|
||||
new_cell.network_metadata = host_cell.network_metadata
|
||||
|
|
|
@ -7066,13 +7066,17 @@ class LibvirtDriver(driver.ComputeDriver):
|
|||
physnets=physnet_affinities[cell.id],
|
||||
tunneled=tunnel_affinities[cell.id])
|
||||
|
||||
cell = objects.NUMACell(id=cell.id, cpuset=cpuset,
|
||||
memory=cell.memory / units.Ki,
|
||||
cpu_usage=0, memory_usage=0,
|
||||
siblings=siblings,
|
||||
pinned_cpus=set([]),
|
||||
mempages=mempages,
|
||||
network_metadata=network_metadata)
|
||||
cell = objects.NUMACell(
|
||||
id=cell.id,
|
||||
cpuset=cpuset,
|
||||
pcpuset=set(), # TODO(stephenfin): Start setting this
|
||||
memory=cell.memory / units.Ki,
|
||||
cpu_usage=0,
|
||||
memory_usage=0,
|
||||
siblings=siblings,
|
||||
pinned_cpus=set([]),
|
||||
mempages=mempages,
|
||||
network_metadata=network_metadata)
|
||||
cells.append(cell)
|
||||
|
||||
return objects.NUMATopology(cells=cells)
|
||||
|
|
Loading…
Reference in New Issue