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;
}
/***********************************************************/