summaryrefslogtreecommitdiff
path: root/emulators/py-nova/files/05-online-cpus.patch
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/py-nova/files/05-online-cpus.patch')
-rw-r--r--emulators/py-nova/files/05-online-cpus.patch63
1 files changed, 0 insertions, 63 deletions
diff --git a/emulators/py-nova/files/05-online-cpus.patch b/emulators/py-nova/files/05-online-cpus.patch
deleted file mode 100644
index ecc4523e0a34..000000000000
--- a/emulators/py-nova/files/05-online-cpus.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 8eb8fb92f21243ae0e41f2f626398d09582de29b Mon Sep 17 00:00:00 2001
-From: Alexander Nusov <alexander.nusov@nfvexpress.com>
-Date: Fri, 25 Nov 2016 17:36:10 +0300
-Subject: [PATCH] add online cpu tracking option
-
----
- nova/conf/libvirt.py | 3 +++
- nova/virt/libvirt/driver.py | 18 +++++++++++-------
- 2 files changed, 14 insertions(+), 7 deletions(-)
-
-diff --git a/nova/conf/libvirt.py b/nova/conf/libvirt.py
-index 2eba080..d133b03 100644
---- a/nova/conf/libvirt.py
-+++ b/nova/conf/libvirt.py
-@@ -471,6 +471,9 @@ events`, refer https://libvirt.org/formatdomain.html#elementsPerf .
- None
-
- """),
-+ cfg.BoolOpt('online_cpu_tracking',
-+ default=True,
-+ help='Enable online cpu tracking'),
- ]
-
- libvirt_imagebackend_opts = [
-diff --git a/nova/virt/libvirt/driver.py b/nova/virt/libvirt/driver.py
-index f9225de..f19ef70 100644
---- a/nova/virt/libvirt/driver.py
-+++ b/nova/virt/libvirt/driver.py
-@@ -5188,11 +5188,12 @@ class LibvirtDriver(driver.ComputeDriver):
-
- cells = []
- allowed_cpus = hardware.get_vcpu_pin_set()
-- online_cpus = self._host.get_online_cpus()
-- if allowed_cpus:
-- allowed_cpus &= online_cpus
-- else:
-- allowed_cpus = online_cpus
-+ if CONF.libvirt.online_cpu_tracking:
-+ online_cpus = self._host.get_online_cpus()
-+ if allowed_cpus:
-+ allowed_cpus &= online_cpus
-+ else:
-+ allowed_cpus = online_cpus
-
- def _get_reserved_memory_for_cell(self, cell_id, page_size):
- cell = self._reserved_hugepages.get(cell_id, {})
-@@ -5205,8 +5206,11 @@ class LibvirtDriver(driver.ComputeDriver):
- if cpu.siblings else ()
- for cpu in cell.cpus)
- ))
-- cpuset &= allowed_cpus
-- siblings = [sib & allowed_cpus for sib in siblings]
-+ if CONF.libvirt.online_cpu_tracking or allowed_cpus:
-+ cpuset &= allowed_cpus
-+ siblings = [sib & allowed_cpus for sib in siblings]
-+
-+
- # Filter out singles and empty sibling sets that may be left
- siblings = [sib for sib in siblings if len(sib) > 1]
-
---
-2.8.1
-