qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Stanislav Vorobiov <s.vorobiov@samsung.com>
Cc: alex@alex.org.uk, sw@weilnetz.de, sangho1206.park@samsung.com,
	qemu-devel@nongnu.org, stefanha@redhat.com,
	syeon.hwang@samsung.com, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH v5] glib: fix g_poll early timeout on windows
Date: Fri, 9 May 2014 20:57:40 +0200	[thread overview]
Message-ID: <20140509185740.GA28528@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1399538830-4443-1-git-send-email-s.vorobiov@samsung.com>

On Thu, May 08, 2014 at 12:47:10PM +0400, Stanislav Vorobiov wrote:
> From: Sangho Park <sangho1206.park@samsung.com>
> 
> 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 <s.vorobiov@samsung.com>
> ---
>  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

  reply	other threads:[~2014-05-09 18:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-08  8:47 [Qemu-devel] [PATCH v5] glib: fix g_poll early timeout on windows Stanislav Vorobiov
2014-05-09 18:57 ` Stefan Hajnoczi [this message]
2014-05-16  5:00   ` Stefan Weil
2014-05-16  6:44     ` Stanislav Vorobiov
2014-05-16  7:14       ` Stefan Weil
2014-05-16 11:32     ` Paolo Bonzini
2014-05-16 18:01       ` Stefan Weil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140509185740.GA28528@stefanha-thinkpad.redhat.com \
    --to=stefanha@gmail.com \
    --cc=alex@alex.org.uk \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=s.vorobiov@samsung.com \
    --cc=sangho1206.park@samsung.com \
    --cc=stefanha@redhat.com \
    --cc=sw@weilnetz.de \
    --cc=syeon.hwang@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).