Bug 1294475 - libvirt start vm under incorrect NUMA memory mode
libvirt start vm under incorrect NUMA memory mode
Status: CLOSED NOTABUG
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
7.2
x86_64 Linux
unspecified Severity medium
: rc
: ---
Assigned To: Michal Privoznik
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-28 06:41 EST by Artyom
Modified: 2016-01-05 03:00 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-04 08:39:43 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Artyom 2015-12-28 06:41:43 EST
Description of problem:
I start vm under NUMA memory strict mode, but when I check vm process numa_maps I can see that process run under prefer mode.

Version-Release number of selected component (if applicable):
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.2 (Maipo)
# uname -r
3.10.0-327.el7.x86_64
# rpm -qa | grep libvirt
libvirt-client-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-config-nwfilter-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-driver-lxc-1.2.17-13.el7_2.2.x86_64
libvirt-lock-sanlock-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-driver-nwfilter-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-driver-interface-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-config-network-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-driver-storage-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-driver-network-1.2.17-13.el7_2.2.x86_64
libvirt-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-kvm-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-driver-secret-1.2.17-13.el7_2.2.x86_64
libvirt-daemon-driver-qemu-1.2.17-13.el7_2.2.x86_64
libvirt-python-1.2.17-2.el7.x86_64
libvirt-daemon-driver-nodedev-1.2.17-13.el7_2.2.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Start vm under numa strict mode:
<numatune>
    <memory mode='strict' nodeset='0,2'/>
</numatune>
2. check numa_maps under vm process
# cat /proc/14328/numa_maps | head -n 1
7fb2677fa000 prefer:2

Actual results:
vm process run under prefer mode

Expected results:
vm process run under bind mode

Additional info:
Comment 2 Michal Privoznik 2016-01-04 08:39:43 EST
This is deliberate. Problem is, if we run it strictly under configured nodes there would be no way how to change it afterwards on a running guest. Therefore, libvirt - just before spawning qemu process - calls numa APIs to set affinity only in preferred mode and uses cgroups to enforce the strictness. See bug 1198645 or upstream commit ea576ee543d6fb955 for more info.
Comment 3 Artyom 2016-01-05 03:00:29 EST
Thanks for explanation, I will check bug 1198645.

Note You need to log in before you can comment on or make changes to this bug.