RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 840789 - The "CPU time" information has been lost except first section while use command "virsh vcpuinfo <guest>".
Summary: The "CPU time" information has been lost except first section while use comma...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.4
Hardware: x86_64
OS: Linux
medium
low
Target Milestone: rc
: ---
Assignee: Peter Krempa
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-17 08:40 UTC by lei wang
Modified: 2012-07-19 14:36 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-19 14:36:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description lei wang 2012-07-17 08:40:57 UTC
Description of problem:
The "CPU time" information has been lost except first section while use command "virsh vcpuinfo <guest>".

Version-Release number of selected component (if applicable):
# rpm -qa |grep libvirt
libvirt-client-0.9.13-2.el6.x86_64
libvirt-0.9.13-2.el6.x86_64
libvirt-python-0.9.13-2.el6.x86_64
libvirt-docs-0.9.13-2.el6.x86_64
libvirt-daemon-0.9.13-2.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1, Install a new vm in a numa box. In the xml description of the vm, we could specify the physical cpuset using "cpuset"attribute of vcpu element. xml as follows:

...
  <vcpu cpuset='0'>3</vcpu>
...

2, then, output the vcpu information on the vm, we can see that all of the vcpu are pinned into the first physical cpu.

# virsh vcpuinfo migratetest

  
Actual results:
The "CPU time" information has been lost except first section.

# virsh vcpuinfo rhel6u3
VCPU:           0
CPU:            0
State:          running
CPU time:       0.7s
CPU Affinity:   y---------------------------------------------------------------------------------------------------------------------------------------------------------------

VCPU:           1
CPU:            0
State:          running
CPU Affinity:   y---------------------------------------------------------------------------------------------------------------------------------------------------------------

VCPU:           2
CPU:            0
State:          running
CPU Affinity:   y---------------------------------------------------------------------------------------------------------------------------------------------------------------


Expected results:
The "CpPU time" could display on every section
# virsh vcpuinfo migratetest
VCPU:           0
CPU:            0
State:          running
CPU time:       85.7s
CPU Affinity:   y-

VCPU:           1
CPU:            0
State:          running
CPU time:       111.0s
CPU Affinity:   y-

VCPU:           2
CPU:            0
State:          running
CPU time:       109.8s
CPU Affinity:   y-

Additional info:
This issue is not reproduce on build libvirt-0.9.10-21.el6_3.1.x86_64.
# rpm -qa |grep libvirt
libvirt-client-0.9.10-21.el6_3.1.x86_64
libvirt-0.9.10-21.el6_3.1.x86_64
libvirt-python-0.9.10-21.el6_3.1.x86_64
# virsh edit rhel6
Domain rhel6 XML configuration not changed.

# virsh list
 Id    Name                           State
----------------------------------------------------
 2     rhel6                          running

# virsh vcpuinfo rhel6
VCPU:           0
CPU:            0
State:          running
CPU time:       15.9s
CPU Affinity:   y-------

VCPU:           1
CPU:            0
State:          running
CPU time:       10.4s
CPU Affinity:   y-------

VCPU:           2
CPU:            0
State:          running
CPU time:       10.5s
CPU Affinity:   y-------

Comment 2 Peter Krempa 2012-07-17 15:52:01 UTC
Does this bug reproduce if you leave the machine running for a while (until the guest fully starts up)?

From the output you provided, it looks like the machine was just started (CPU 0 consumed 0.7s cpu time) and the guest OS wasn't able to start the extra processors you assigned to it. This results then in not showing the CPU time: line as the processors didn't consume any time.

Comment 3 Peter Krempa 2012-07-17 15:57:45 UTC
Output from a quick test on my machine that supports the hypothesis:

virsh # start win7
Domain win7 started

virsh # vcpuinfo win7
VCPU:           0
CPU:            0
State:          running
CPU time:       4.0s
CPU Affinity:   y---

VCPU:           1
CPU:            0
State:          running
CPU Affinity:   y---

virsh # vcpuinfo win7
VCPU:           0
CPU:            0
State:          running
CPU time:       5.9s
CPU Affinity:   y---

VCPU:           1
CPU:            0
State:          running
CPU Affinity:   y---

virsh # vcpuinfo win7
VCPU:           0
CPU:            0
State:          running
CPU time:       7.5s
CPU Affinity:   y---

VCPU:           1
CPU:            0
State:          running
CPU time:       0.2s
CPU Affinity:   y---

virsh # vcpuinfo win7
VCPU:           0
CPU:            0
State:          running
CPU time:       8.0s
CPU Affinity:   y---

VCPU:           1
CPU:            0
State:          running
CPU time:       0.7s
CPU Affinity:   y---

Comment 4 lei wang 2012-07-18 02:15:39 UTC
(In reply to comment #2)
> Does this bug reproduce if you leave the machine running for a while (until
> the guest fully starts up)?
> 
> From the output you provided, it looks like the machine was just started
> (CPU 0 consumed 0.7s cpu time) and the guest OS wasn't able to start the
> extra processors you assigned to it. This results then in not showing the
> CPU time: line as the processors didn't consume any time.

Hi Peter, you are right, I check this issue again in my test environment, the other cpu is not running before service starting, the cpu will be running once service starting.

[root@localhost ~]# virsh vcpuinfo rhel6q
VCPU:           0
CPU:            0
State:          running
CPU time:       6.0s
CPU Affinity:   y-------

VCPU:           1
CPU:            0
State:          running
CPU Affinity:   y-------

[root@localhost ~]# virsh vcpuinfo rhel6q
VCPU:           0
CPU:            0
State:          running
CPU time:       6.3s
CPU Affinity:   y-------

VCPU:           1
CPU:            0
State:          running
CPU time:       0.2s
CPU Affinity:   y-------

Comment 5 Peter Krempa 2012-07-19 14:36:14 UTC
Hi Lei,
I'm going to close this as NOTABUG. Please reopen this bug if any of your test machines would show up the same symptoms after the guest OS started all the allocated virtual processors.


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