All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Laszlo Ersek <lersek@redhat.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: Thread safety of coroutine-sigaltstack
Date: Fri, 22 Jan 2021 08:55:18 +0100	[thread overview]
Message-ID: <87r1mde789.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <30457fa0-6d7c-4e81-2623-8551d8bf2674@redhat.com> (Paolo Bonzini's message of "Thu, 21 Jan 2021 16:14:21 +0100")

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 21/01/21 10:27, Max Reitz wrote:
>> Sure, I can do that.
>> I agree that there probably are better solutions than to wrap
>> everything in a lock.  OTOH, it looks to me like this lock is the
>> most simple solution.  If Daniel is right[1] and we should drop 
>> coroutine-sigaltstack altogether (at some point...), perhaps it is
>> best to go for the most simple solution now.
>> [1]
>> https://lists.nongnu.org/archive/html/qemu-block/2021-01/msg00808.html
>
> Yes, between coroutine-ucontext and the upcoming coroutine-asm[1]
> (which I have shelved because it was mostly a requirement for x86 CET;
> but it will come back some day), sooner or later there will be no
> reason to keep coroutine-sigaltstack.  Porting coroutine-asm to a new
> architecture is easy, I even managed to do it for s390. ;)

POSIX dropping ucontext without a replacement was shortsighted.  Yes,
ucontext is warty, but that's no excuse for letting your users fend for
themselves.  Standard building blocks for coroutines are clearly needed.
Without them, everybody gets to build from scratch or with ill-suited
blocks like sigaltstack.

> Paolo
>
> [1] https://patchew.org/QEMU/20190504120528.6389-1-pbonzini@redhat.com/



  parent reply	other threads:[~2021-01-22  7:56 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 16:26 Thread safety of coroutine-sigaltstack Max Reitz
2021-01-20 16:50 ` Paolo Bonzini
2021-01-20 16:58 ` Eric Blake
2021-01-20 17:25 ` Laszlo Ersek
2021-01-21  9:27   ` Max Reitz
2021-01-21 13:34     ` Laszlo Ersek
2021-01-21 15:42       ` Max Reitz
2021-01-21 16:04         ` Daniel P. Berrangé
2021-01-21 16:05         ` Laszlo Ersek
2021-01-21 15:14     ` Paolo Bonzini
2021-01-21 16:07       ` Daniel P. Berrangé
2021-01-21 16:44         ` Peter Maydell
2021-01-21 17:24           ` Paolo Bonzini
2021-01-22 20:38             ` Laszlo Ersek
2021-01-22 21:34               ` Laszlo Ersek
2021-01-22 21:41                 ` Laszlo Ersek
2021-01-22  7:55       ` Markus Armbruster [this message]
2021-01-22  8:48   ` Max Reitz
2021-01-22 10:14     ` Peter Maydell
2021-01-22 10:16       ` Max Reitz
2021-01-22 12:24       ` Laszlo Ersek
2021-01-23  0:06       ` Laszlo Ersek
2021-01-23 13:35         ` Peter Maydell
2021-01-25 22:15           ` Laszlo Ersek
2021-01-25 22:45             ` Paolo Bonzini
2021-01-26  8:57               ` Laszlo Ersek

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=87r1mde789.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lersek@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.