qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3] Reduce redundant timer rearming


From: Anders
Subject: Re: [Qemu-devel] [PATCH 3] Reduce redundant timer rearming
Date: Fri, 14 Dec 2007 01:05:27 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20071022)

The VGA refresh (a 33 Hz timer) is running even with -nographics, apparently doing nothing. The vga_hw_update() call ends up just returning, because the display depth is zero.

This patch removes the dummy refresh handler, and thus the GUI refresh timer.


With an idle dyntick Linux guest in qemu/kvm, there are now only two timers per second (those are from the rtc). Another 10 seconds strace:

% time     seconds  usecs/call     calls    errors syscall
------ ----------- ----------- --------- --------- ----------------
100.00    0.000012           0      3760        20 ioctl
  0.00    0.000000           0        41           select
  0.00    0.000000           0        20           rt_sigaction
  0.00    0.000000           0        61        41 rt_sigtimedwait
  0.00    0.000000           0        20           timer_settime
  0.00    0.000000           0        20           timer_gettime
  0.00    0.000000           0       162           clock_gettime
------ ----------- ----------- --------- --------- ----------------
100.00    0.000012                  4084        61 total


Cheers,
Anders.
diff --git a/qemu/vl.c b/qemu/vl.c
index 30c9537..8d67314 100644
--- a/qemu/vl.c
+++ b/qemu/vl.c
@@ -4902,13 +4902,6 @@ static void dumb_resize(DisplayState *ds, int w, int h)
 {
 }
 
-static void dumb_refresh(DisplayState *ds)
-{
-#if defined(CONFIG_SDL)
-    vga_hw_update();
-#endif
-}
-
 static void dumb_display_init(DisplayState *ds)
 {
     ds->data = NULL;
@@ -4916,7 +4909,7 @@ static void dumb_display_init(DisplayState *ds)
     ds->depth = 0;
     ds->dpy_update = dumb_update;
     ds->dpy_resize = dumb_resize;
-    ds->dpy_refresh = dumb_refresh;
+    ds->dpy_refresh = NULL;
 }
 
 /***********************************************************/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]