From: Paolo Bonzini <pbonzini@redhat.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Amit Shah <amit.shah@redhat.com>,
aliguori@us.ibm.com, qemu-devel@nongnu.org, gson@gson.org
Subject: Re: [Qemu-devel] [RFC PATCH] main-loop: Unconditionally unlock iothread
Date: Thu, 04 Apr 2013 07:44:59 +0200 [thread overview]
Message-ID: <515D135B.4020003@redhat.com> (raw)
In-Reply-To: <CAEgOgz6uWZd7v3fmvRCAWGqvwAoH3wr5ZN3WqpxkVHOSzhkMsw@mail.gmail.com>
Il 04/04/2013 01:58, Peter Crosthwaite ha scritto:
>
> I think there may be a flaw in that "any of the descriptors being
> pollable" is not a good definition of progress. stdin is blocked by
> the fact that the device and mux cannot accept their data anymore so
> even though its readable, no meaningful read will happen. That leaves
> us with having to devise more elaborate code to define progress, or we
> simplify by just removing this nonblocking optimisation altogether
> (original patch).
If stdin is blocked, it shouldn't be polled at all. That is the purpose
of the can_read callback. Unfortunately, return FALSE from the prepare
callback still leaves the poll handler.
So your original patch fixes the symptom, but leaves the busy waiting
unfixed.
The right thing to use would be g_source_add_child_source() and
g_source_remove_child_source(), but that is only present since glib 2.28
and we currently require 2.12 (2.20 on Windows).
Anthony, Amit, can you look at it?
Paolo
next prev parent reply other threads:[~2013-04-04 5:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 9:04 [Qemu-devel] [RFC PATCH] main-loop: Unconditionally unlock iothread Peter Crosthwaite
2013-04-02 11:11 ` Paolo Bonzini
2013-04-03 2:17 ` Peter Crosthwaite
2013-04-03 6:35 ` Paolo Bonzini
2013-04-03 23:58 ` Peter Crosthwaite
2013-04-04 5:44 ` Paolo Bonzini [this message]
2013-04-04 13:49 ` Anthony Liguori
2013-04-04 16:59 ` Anthony Liguori
2013-04-04 17:03 ` Peter Maydell
2013-04-04 18:17 ` Anthony Liguori
2013-04-04 18:57 ` Paolo Bonzini
2013-04-04 19:54 ` Anthony Liguori
-- strict thread matches above, loose matches on Subject: below --
2013-04-02 8:53 Peter Crosthwaite
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=515D135B.4020003@redhat.com \
--to=pbonzini@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=amit.shah@redhat.com \
--cc=gson@gson.org \
--cc=peter.crosthwaite@xilinx.com \
--cc=qemu-devel@nongnu.org \
/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).