From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvlSa-0007UZ-UA for qemu-devel@nongnu.org; Fri, 10 Feb 2012 03:04:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RvlSV-00022J-6O for qemu-devel@nongnu.org; Fri, 10 Feb 2012 03:04:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:27132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RvlSU-000227-Vx for qemu-devel@nongnu.org; Fri, 10 Feb 2012 03:03:55 -0500 Message-ID: <4F34CF5E.9080106@redhat.com> Date: Fri, 10 Feb 2012 09:03:42 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1327688498-12362-6-git-send-email-stefano.stabellini@eu.citrix.com> <201202100026.40727.paul@codesourcery.com> In-Reply-To: <201202100026.40727.paul@codesourcery.com> Content-Type: text/plain; charset=ISO-8859-6; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 6/6] qemu_calculate_timeout: increase minimum timeout to 1h List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: avi@redhat.com, xen-devel@lists.xensource.com, qemu-devel@nongnu.org, Stefano Stabellini On 02/10/2012 01:26 AM, Paul Brook wrote: > The reason we have this is because there are bits of code that rely on > polling. IIRC slirp and the floppy DMA engine were the main culprits. > qemu_calculate_timeout is an ugly hack to poll at least once a second, > allowing the guest to make forward progress when we miss an event. At least the floppy DMA engine is fine with it, it uses idle bottom halves (which are a hack and could be replaced by timers, but that's not relevant now). Slirp's timeouts indeed require polling. if (time_fasttimo && ((curtime - time_fasttimo) >= 2)) { tcp_fasttimo(slirp); time_fasttimo = 0; } if (do_slowtimo && ((curtime - last_slowtimo) >= 499)) { ip_slowtimo(slirp); tcp_slowtimo(slirp); last_slowtimo = curtime; } Paolo