Bug 626742 - virsh vcpuinfo gives inaccurate output after vcpu pinning on NUMA host
virsh vcpuinfo gives inaccurate output after vcpu pinning on NUMA host
Status: CLOSED CANTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.0
All Linux
low Severity medium
: rc
: ---
Assigned To: Daniel Berrange
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-08-24 05:25 EDT by Keqin Hong
Modified: 2011-06-20 21:45 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-06-20 21:45:18 EDT
Type: ---
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 Keqin Hong 2010-08-24 05:25:45 EDT
Description of problem:
After executing some vcpupin operation under virsh, CPU and CPU Affinity info mismatch by checking vcpuinfo.

Version-Release number of selected component (if applicable):
libvirt-0.8.1-27.el6.x86_64
libvirt-client-0.8.1-27.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. # virsh dump guest1
...
<vcpu cpuset='0-3'>4</vcpu>
...
2. # virsh start guest1
3. # virsh vcpuinfo guest1
VCPU:           0
CPU:            1
State:          running
CPU time:       9.2s
CPU Affinity:   yyyy------------

VCPU:           1
CPU:            0
State:          running
CPU time:       2.3s
CPU Affinity:   yyyy------------

VCPU:           2
CPU:            0
State:          running
CPU time:       2.7s
CPU Affinity:   yyyy------------

VCPU:           3
CPU:            0
State:          running
CPU time:       2.5s
CPU Affinity:   yyyy------------

4. pin vcpu0-3 to physical cpu0-3 respectively
# virsh vcpupin guest1 0 0
# virsh vcpupin guest1 1 1
# virsh vcpupin guest1 2 2
# virsh vcpupin guest1 3 3

5.# virsh vcpuinfo guest1
VCPU:           0
CPU:            1
                ^ wrong
State:          running
CPU time:       9.2s
CPU Affinity:   y---------------
                ^ right

VCPU:           1
CPU:            1
                ^ right
State:          running
CPU time:       2.4s
CPU Affinity:   -y--------------
                 ^ right
VCPU:           2
CPU:            0
                ^ wrong
State:          running
CPU time:       2.7s
CPU Affinity:   --y-------------
                  ^ right

VCPU:           3
CPU:            1
                ^ wrong
State:          running
CPU time:       2.6s
CPU Affinity:   ---y------------
                   ^ right
  
Actual results:
CPU and CPU affinity info mismatch

Expected results:
CPU and CPU affinity info should match

Additional info:
1. The problem seems to happen on NUMA machine only.
2. After a long time (several mins later), CPU and CPU affinity info match eventually.
So the problem is the CPU info being not synchronized in time.
Comment 1 Daniel Berrange 2010-08-24 06:15:49 EDT
The 'CPU: 1' field tells you what host CPU the guest vCPU is currently executing on. It sounds like the kernel isn't immediately honouring the CPU affinity libvirt requested & I'm not aware of any way to force it todo this more promptly
Comment 2 Suzanne Yeghiayan 2011-03-28 17:12:04 EDT
Since RHEL 6.1 External Beta has begun, and this bug remains 
unresolved, it has been rejected as it is not proposed as an 
exception or blocker.

Red Hat invites you to ask your support representative to 
propose this request, if appropriate and relevant, in the 
next release of Red Hat Enterprise Linux.
Comment 3 Dave Allan 2011-06-20 21:45:18 EDT
Closing as CANTFIX per comment 1.

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