From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51201) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlBt6-0005HA-D4 for qemu-devel@nongnu.org; Fri, 16 May 2014 02:45:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlBt0-0001qr-1H for qemu-devel@nongnu.org; Fri, 16 May 2014 02:45:00 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:11696) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlBsz-0001qg-RY for qemu-devel@nongnu.org; Fri, 16 May 2014 02:44:53 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N5N00AXUMQN4Z60@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Fri, 16 May 2014 07:44:47 +0100 (BST) Message-id: <5375B3DE.9010307@samsung.com> Date: Fri, 16 May 2014 10:44:46 +0400 From: Stanislav Vorobiov MIME-version: 1.0 References: <1399538830-4443-1-git-send-email-s.vorobiov@samsung.com> <20140509185740.GA28528@stefanha-thinkpad.redhat.com> <53759B68.303@weilnetz.de> In-reply-to: <53759B68.303@weilnetz.de> Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5] glib: fix g_poll early timeout on windows List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil , Stefan Hajnoczi Cc: alex@alex.org.uk, sangho1206.park@samsung.com, qemu-devel@nongnu.org, stefanha@redhat.com, syeon.hwang@samsung.com, pbonzini@redhat.com Hi, Could you please provide URL to download that image so that I could reproduce this problem ? Also, qemu command line would be nice. btw, I won't be able to look into this during next week, so some help from someone else would be nice. I'll try to take a look later today however... On 05/16/2014 09:00 AM, Stefan Weil wrote: > Am 09.05.2014 20:57, schrieb Stefan Hajnoczi: >> On Thu, May 08, 2014 at 12:47:10PM +0400, Stanislav Vorobiov wrote: >>> From: Sangho Park >>> >>> g_poll has a problem on Windows when using >>> timeouts < 10ms, in glib/gpoll.c: >>> >>> /* If not, and we have a significant timeout, poll again with >>> * timeout then. Note that this will return indication for only >>> * one event, or only for messages. We ignore timeouts less than >>> * ten milliseconds as they are mostly pointless on Windows, the >>> * MsgWaitForMultipleObjectsEx() call will timeout right away >>> * anyway. >>> */ >>> if (retval == 0 && (timeout == INFINITE || timeout >= 10)) >>> retval = poll_rest (poll_msgs, handles, nhandles, fds, nfds, timeout); >>> >>> so whenever g_poll is called with timeout < 10ms it does >>> a quick poll instead of wait, this causes significant performance >>> degradation of QEMU, thus we should use WaitForMultipleObjectsEx >>> directly >>> >>> Signed-off-by: Stanislav Vorobiov >>> --- >>> include/glib-compat.h | 9 +++- >>> util/oslib-win32.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++ >>> 2 files changed, 120 insertions(+), 1 deletion(-) >> >> Thanks, applied to my block tree: >> https://github.com/stefanha/qemu/commits/block >> >> Stefan >> > > > > Hi, > > the patch breaks hard disk i/o: a 64 bit executable built with MinGW-w64 > will no longer boot a ReactOS image (BIOS fails to detect a bootable > disk). Booting a Linux CDROM seems to work and is indeed much faster. > > Regards > Stefan > >