Skip to content

Commit 7c8c6b8

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "hardware: Don't consider overhead CPUs for unpinned instances"
2 parents d7f9862 + 0a0c174 commit 7c8c6b8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

nova/virt/hardware.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,6 @@ def _numa_fit_instance_cell(host_cell, instance_cell, limit_cell=None,
11271127
# NOTE(stephenfin): As with memory, do not allow an instance to overcommit
11281128
# against itself on any NUMA cell
11291129
if instance_cell.cpu_policy == fields.CPUAllocationPolicy.DEDICATED:
1130-
# TODO(stephenfin): Is 'cpuset_reserved' present if consuming emulator
1131-
# threads from shared CPU pools? If so, we don't want to add this here
11321130
required_cpus = len(instance_cell.cpuset) + cpuset_reserved
11331131
if required_cpus > len(host_cell.pcpuset):
11341132
LOG.debug('Not enough host cell CPUs to fit instance cell; '
@@ -1140,14 +1138,12 @@ def _numa_fit_instance_cell(host_cell, instance_cell, limit_cell=None,
11401138
})
11411139
return
11421140
else:
1143-
required_cpus = len(instance_cell.cpuset) + cpuset_reserved
1141+
required_cpus = len(instance_cell.cpuset)
11441142
if required_cpus > len(host_cell.cpuset):
11451143
LOG.debug('Not enough host cell CPUs to fit instance cell; '
1146-
'required: %(required)d + %(cpuset_reserved)d as '
1147-
'overhead, actual: %(actual)d', {
1144+
'required: %(required)d, actual: %(actual)d', {
11481145
'required': len(instance_cell.cpuset),
11491146
'actual': len(host_cell.cpuset),
1150-
'cpuset_reserved': cpuset_reserved
11511147
})
11521148
return
11531149

0 commit comments

Comments
 (0)