From: Anthony Liguori <aliguori@us.ibm.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Michael Tokarev <mjt@tls.msk.ru>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1.1] coroutine: Avoid ucontext usage on i386 Linux host
Date: Wed, 09 May 2012 15:59:49 -0500 [thread overview]
Message-ID: <4FAADAC5.3040001@us.ibm.com> (raw)
In-Reply-To: <CAFEAcA_=9QP4Da6LTP382r+uUH21aAV5araAmUu0U+U+Ha8o4w@mail.gmail.com>
On 05/09/2012 03:46 PM, Peter Maydell wrote:
> On 9 May 2012 21:11, Jan Kiszka<jan.kiszka@siemens.com> wrote:
>> OK. Then what about sigaltstack (once fixed)? Is it also slower? If not,
>> can we converge over it?
>
> sigaltstack is going to be significantly faster than the gthread
> implementation (about the same speed as ucontext for coroutine
> switch, a bit slower for coroutine creation).
>
> It suffers from the same problem of being a code path which nobody
> has seriously stress tested, though. And it does at least one thing
> which is "not permitted by the standards but works anyway".
>
>> I would really hate staying with this time bomb
>> of broken RT signals unless someone tells me we will kick out all these
>> coroutines rather sooner than later.
>
> I think that regardless of the long term choice it would be
> a pretty risky decision to switch coroutine implementation
> this close to release when we have the option of just using
> a different signal that avoids the bug.
>
> Longer term (ie post 1.1) I'm strongly in favour of kicking
> out coroutines, because I think there clearly is no single
> solid portable implementation possible. C just isn't designed
> to allow them; better not to try to swim against the current.
Unfortunately, voting for code to be different doesn't actually make it different.
If you're volunteering to rewrite the block layer to not require coroutines
(either by using a state machine or by using re-entrant threads and fixing any
locking issues associated with that) that's wonderful.
But we decided to not do synchronous I/O years ago and still haven't removed it
all from the tree. Coroutines got us much closer to getting rid of synchronous I/O.
Regards,
Anthony Liguori
>
> -- PMM
>
next prev parent reply other threads:[~2012-05-09 21:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-09 19:21 [Qemu-devel] [PATCH 1.1] coroutine: Avoid ucontext usage on i386 Linux host Jan Kiszka
2012-05-09 19:27 ` Michael Tokarev
2012-05-09 19:34 ` Jan Kiszka
2012-05-09 19:48 ` Anthony Liguori
2012-05-09 19:57 ` Jan Kiszka
2012-05-09 20:01 ` Anthony Liguori
2012-05-09 20:11 ` Jan Kiszka
2012-05-09 20:46 ` Peter Maydell
2012-05-09 20:59 ` Anthony Liguori [this message]
2012-05-09 21:27 ` Peter Maydell
2012-05-09 21:36 ` Anthony Liguori
2012-05-09 20:56 ` Anthony Liguori
2012-05-09 20:04 ` Michael Tokarev
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=4FAADAC5.3040001@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=jan.kiszka@siemens.com \
--cc=kwolf@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--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).