Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1J2y3Y-0005uJ-77 for qemu-devel@nongnu.org; Thu, 13 Dec 2007 19:05:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1J2y3X-0005se-4z for qemu-devel@nongnu.org; Thu, 13 Dec 2007 19:05:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J2y3W-0005sW-U2 for qemu-devel@nongnu.org; Thu, 13 Dec 2007 19:05:31 -0500 Received: from 0xc2c0b63d.fbbft3nxf1.bf-dhcp.tele.dk ([194.192.182.61] helo=smtp.hotelhot.dk) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1J2y3W-0003FV-AB for qemu-devel@nongnu.org; Thu, 13 Dec 2007 19:05:30 -0500 Received: from smtp.hotelhot.dk (localhost [127.0.0.1]) by smtp.hotelhot.dk (Postfix) with ESMTP id 2937D1409E for ; Fri, 14 Dec 2007 01:05:26 +0100 (CET) Received: from [192.168.0.251] (dhcp251.kalibalik.dk [192.168.0.251]) by smtp.hotelhot.dk (Postfix) with ESMTP id 045DC14093 for ; Fri, 14 Dec 2007 01:05:25 +0100 (CET) Message-ID: <4761C8C7.1030202@flac.kalibalik.dk> Date: Fri, 14 Dec 2007 01:05:27 +0100 From: Anders MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 3] Reduce redundant timer rearming References: <4761BA27.5020307@flac.kalibalik.dk> In-Reply-To: <4761BA27.5020307@flac.kalibalik.dk> Content-Type: multipart/mixed; boundary="------------060604000605060706040406" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------060604000605060706040406 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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. --------------060604000605060706040406 Content-Type: text/x-patch; name="qemu-disable-dummy-vga-refresh.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-disable-dummy-vga-refresh.patch" 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; } /***********************************************************/ --------------060604000605060706040406--