diff options
author | kalyanreddy <reddyx.gundarapu@intel.com> | 2017-05-25 15:01:40 +0530 |
---|---|---|
committer | Kalyan reddy Gundarapu <reddyx.gundarapu@intel.com> | 2017-05-31 08:33:17 +0000 |
commit | a6a5c653357cf0fd82c489501b6bdbacb2aaf65b (patch) | |
tree | e4b423e661fb1f07769025ede12b95f69030f5d1 /vnfs/qemu | |
parent | e71e24ec001cfc06e27ce12c081ba749948b4599 (diff) |
Qemu: Mechanism to pass extra qemu cpu features and pin vCPU threads
JIRA: VSPERF-510
This patch is used to implement the mechanism to pass extra qemu
cpu options required to achieve better results/performance. Also
used to implement a mechanism to pin the vCPU threads to another
pCPU core which helps in reducing the noise from housekeeping
thread and packet loss.
Change-Id: Ic40fd47d7c4f5556f7e240c6ca671a0535d06ece
Signed-off-by: Gundarapu Kalyan Reddy <reddyx.gundarapu@intel.com>
Diffstat (limited to 'vnfs/qemu')
-rw-r--r-- | vnfs/qemu/qemu.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py index a9ce176a..b48f7630 100644 --- a/vnfs/qemu/qemu.py +++ b/vnfs/qemu/qemu.py @@ -88,7 +88,7 @@ class IVnfQemu(IVnf): S.getValue('TOOLS')['qemu-system'], '-m', S.getValue('GUEST_MEMORY')[self._number], '-smp', str(S.getValue('GUEST_SMP')[self._number]), - '-cpu', 'host,migratable=off', + '-cpu', str(S.getValue('GUEST_CPU_OPTIONS')[self._number]), '-drive', 'if={},file='.format(S.getValue( 'GUEST_BOOT_DRIVE_TYPE')[self._number]) + S.getValue('GUEST_IMAGE')[self._number], @@ -233,12 +233,13 @@ class IVnfQemu(IVnf): for cpu in range(0, int(S.getValue('GUEST_SMP')[self._number])): match = None + guest_thread_binding = S.getValue('GUEST_THREAD_BINDING')[self._number] + if guest_thread_binding is None: + guest_thread_binding = S.getValue('GUEST_CORE_BINDING')[self._number] for line in output.decode(cur_locale).split('\n'): match = re.search(thread_id % cpu, line) if match: - self._affinitize_pid( - S.getValue('GUEST_CORE_BINDING')[self._number][cpu], - match.group(1)) + self._affinitize_pid(guest_thread_binding[cpu], match.group(1)) break if not match: |