Hide Forgot
+++ This bug was initially created as a clone of Bug #1170492 +++ Description of problem: vcpu placement is default to numatune placement or "static" if cpuset is specified. So if user edit domain xml as: <vcpu placement='static' current='2'>6</vcpu> <numatune> <memory mode='strict' placement='auto'/> </numatune> libvirt will turn vcpu placement to 'auto', like: <vcpu placement='auto' current='2'>6</vcpu> <numatune> <memory mode='strict' placement='auto'/> </numatune> But this tuning will break the rule of emulatorpin is not allowed if attribute placement of element vcpu is "auto". In other word, emulatorpin could be set when vcpu placement is 'static', and numatune memory placement is 'auto': <vcpu placement='auto' current='2'>6</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> Version-Release number of selected component (if applicable): libvirt-1.2.8-9.el7.x86_64 qemu-kvm-rhev-2.1.2-13.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1. edit domain xml # virsh edit r7a ... <vcpu placement='static' current='2'>6</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> ... # virsh dumpxml r7a ... <vcpu placement='auto' current='2'>6</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> ... 2. start guest # virsh start r7a 3. check via emulatorpin # virsh emulatorpin r7a emulator: CPU Affinity ---------------------------------- *: 1-3 4. check via cgroup # cat /sys/fs/cgroup/cpuset/machine.slice/machine-qemu\\x2dr7a.scope/emulator/cpuset.cpus 0-7 Expect result: Either report error for specifying emulatorpin when vcpu placement is auto, or ignoring emulatorpin configuration. --- Additional comment from Jincheng Miao on 2014-12-04 02:06:05 EST --- This problem is also existing for iothreadpin of cputune. And It's also existed in RHEL6, I will clone it to RHEL6. In RHEL6 libvirt-0.10.2-46.el6.x86_64: # virsh edit r6 ... <vcpu placement='static' current='2'>4</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> ... # virsh emulatorpin r6 emulator: CPU Affinity ---------------------------------- *: 1-3 # cat /cgroup/cpuset/libvirt/qemu/r6/emulator/cpuset.cpus 0-7
Moving to POST: http://post-office.corp.redhat.com/archives/rhvirt-patches/2015-February/msg00087.html
This problem could be reproduced in libvirt-0.10.2-48.el6.x86_64: 1. define a guest with static vcpu placement and auto memory placement, and with emulatorpin # virsh edit rhel <vcpu placement='static' current='2'>5</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> 2. then domain xml transfers into auto vcpu placement # virsh dumpxml rhel <vcpu placement='auto' current='2'>5</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> But in latest libvirt-0.10.2-49.el6.x86_64: 1. # virsh edit rhel <vcpu placement='static' current='2'>5</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> 2. # virsh dumpxml rhel <vcpu placement='static' current='2'>5</vcpu> <cputune> <emulatorpin cpuset='1-3'/> </cputune> <numatune> <memory mode='strict' placement='auto'/> </numatune> 3. check emulatorpinning # virsh emulatorpin rhelemulator: CPU Affinity ---------------------------------- *: 1-3 # cat /cgroup/cpuset/libvirt/qemu/rhel/emulator/cpuset.cpus 1-3 So this problem is fixed, and I will change the status to VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1252.html