Received: from eggs.gnu.org ([2001:4830:134:3::10]:59642) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dQfPz-0006vK-2f for qemu-devel@nongnu.org; Thu, 29 Jun 2017 15:48:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dQfPy-0008Ua-A4 for qemu-devel@nongnu.org; Thu, 29 Jun 2017 15:47:59 -0400 Date: Thu, 29 Jun 2017 15:47:39 -0400 (EDT) From: Paolo Bonzini Message-ID: <991581394.12897770.1498765659699.JavaMail.zimbra@redhat.com> In-Reply-To: References: <4b48ca3f3c45bee1103bcb50d87e6d5cadc88d6f.1498607452.git.alistair.francis@xilinx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC v1 4/4] util/oslib-win32: Recursivly pass the timeout List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alistair Francis Cc: "qemu-devel@nongnu.org Developers" , Stefan Hajnoczi , Fam Zheng , Edgar Iglesias , qemu-block@nongnu.org > On Thu, Jun 29, 2017 at 5:34 AM, Paolo Bonzini wrote: > > On 28/06/2017 01:57, Alistair Francis wrote: > > I'm not sure I agree with this change, which is effectively delaying the > > processing of events. The question to me is which handles are > > triggering so fast that QEMU effectively busy waits. > > Yeah, that is what I was trying to figure out, but didn't make much headway. > > I kept seeing zero timeouts, which means that the thread never blocks > and this patch helps a lot. Perhaps you can use tracepoints? There shouldn't be many handles registered, since on Windows even the GUI actions all go through messages. > > Maybe your QEMUs can get some breath with commit 12f8def0e0 ("win32: > > replace custom mutex and condition variable with native primitives", > > 2017-03-27), since the native primitives are more efficient and TCG 2.8 > > used condvars a lot for qemu_io_proceeded_cond. > > Ok, I will try that. > > Does this mean you don't see the same slowness on QEMU 2.9? I have not tried, but the patch is only working around the real issue, as Fam pointed out. Paolo