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 796575 - qemu-kvm wakes up 66 times a second
Summary: qemu-kvm wakes up 66 times a second
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-23 08:43 UTC by Paolo Bonzini
Modified: 2013-01-09 11:59 UTC (History)
13 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.240.el6
Doc Type: Bug Fix
Doc Text:
Cause: QEMU used to require periodic polling for events. Consequence: QEMU would wake up many times per seconds. Fix: Since QEMU sets up specific timers when it requires to poll for events, the generic polling timer was removed. Resolution: An idle guest, with no VNC or SPICE connection active, will not wake up the QEMU process unnecessarily.
Clone Of:
Environment:
Last Closed: 2012-06-20 11:43:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0746 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2012-06-19 19:31:48 UTC

Description Paolo Bonzini 2012-02-23 08:43:40 UTC
Description of problem:
qemu-kvm has a timer that is used in VNC mode and fires 66 times a second to do... nothing.  It should be possible to remove it.  Before removing it, however, upstream also changed the handling of coalesced MMIO to do it directly in the VGA display models.  This can fix screen refreshing delays.

commit 1cae88b9f4121c9af0bf677435c6129e643280fd 
commit e9a07334fb6ee08ddd61787c102d36e7e781efef 
commit 62a2744ca09a0b44b8406ea0c430c4c67a2c3231 

Version-Release number of selected component (if applicable):
0.12.1-2.229.el6

How reproducible:
100%

Steps to Reproduce:
1. strace -e timer_settime qemu-kvm ...
2. Let Linux start boot in the guest.
3. Close any VNC consoles.
  
Actual results:
Many timer_settime calls per second.

Expected results:
Not many timer_settime calls per second, especially when the guest is idle.

Additional info:
The wakeups also cause bug 785940.

Comment 4 juzhang 2012-05-02 06:23:52 UTC
Reproduced this issue with qemu-kvm-0.12.1.2-2.233.el6

1. boot guest with -vnc
2. close vnc console
3. collecting timer_settime in 10 seconds

Results:
strace -c -p `pidof qemu-kvm`
Process 20299 attached - interrupt to quit
^CProcess 20299 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 91.03    0.021183          13      1621           select
  3.52    0.000819           1      1479           write
  2.95    0.000686           0      4537      2211 read
  1.53    0.000355           1       693           rt_sigaction
  0.88    0.000204           0      1040           timer_gettime
  0.10    0.000024           0       693           timer_settime
  0.00    0.000000           0         1           mmap
  0.00    0.000000           0         1           mprotect
  0.00    0.000000           0         8           rt_sigprocmask
  0.00    0.000000           0        45           ioctl
  0.00    0.000000           0         2           writev
  0.00    0.000000           0         4           clone
  0.00    0.000000           0        51         2 futex
------ ----------- ----------- --------- --------- ----------------
100.00    0.023271                 10175      2213 total

Verified this issue with qemu-kvm-0.12.1.2-2.282.el6

Results:
strace -c -p `pidof qemu-kvm`
Process 20046 attached - interrupt to quit
^CProcess 20046 detached
% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
 98.74    0.013998         105       133           select
  0.71    0.000101           0       340       163 read
  0.48    0.000068           1        84           write
  0.07    0.000010           0        60           timer_gettime
  0.00    0.000000           0        40           rt_sigaction
  0.00    0.000000           0        25           ioctl
  0.00    0.000000           0         1           writev
  0.00    0.000000           0        10         1 futex
  0.00    0.000000           0        40           timer_settime
------ ----------- ----------- --------- --------- ----------------
100.00    0.014177                   733       164 total

Summary
with fixed version, the timer_gettime and timer_settime calls times from "1040","693" to "60","40". any way, this issue is fixed.

Comment 7 Michal Novotny 2012-05-04 12:54:54 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
NEEDINFO

Comment 8 Paolo Bonzini 2012-05-04 14:00:15 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1,7 @@
-NEEDINFO+Cause: QEMU used to require periodic polling for events.
+
+Consequence: QEMU would wake up many times per seconds.
+
+Fix: Since QEMU sets up specific timers when it requires to poll for events, the generic polling timer was removed.
+
+Resolution: An idle guest, with no VNC or SPICE connection active, will not wake up the QEMU process unnecessarily.

Comment 9 errata-xmlrpc 2012-06-20 11:43:51 UTC
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.

http://rhn.redhat.com/errata/RHBA-2012-0746.html


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