All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joelle van Dyne <j@getutm.app>
To: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Joelle van Dyne <j@getutm.app>,
	"open list:raw" <qemu-block@nongnu.org>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] coroutine: add libucontext as external library
Date: Tue, 9 Mar 2021 10:24:00 -0800	[thread overview]
Message-ID: <CA+E+eSBiPAYtWyhMx07g8+ovON8hfF1kaoOLhUTUc0vWpYOtYA@mail.gmail.com> (raw)
In-Reply-To: <YEeWimKd1QVd176N@stefanha-x1.localdomain>

On Tue, Mar 9, 2021 at 7:38 AM Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> On Mon, Mar 08, 2021 at 07:26:36PM -0800, Joelle van Dyne wrote:
> > iOS does not support ucontext natively for aarch64 and the sigaltstack is
> > also unsupported (even worse, it fails silently, see:
> > https://openradar.appspot.com/13002712 )
> >
> > As a workaround we include a library implementation of ucontext and add it
> > as a build option.
> >
> > Signed-off-by: Joelle van Dyne <j@getutm.app>
> > ---
> >  configure                 | 21 ++++++++++++++++++---
> >  meson.build               | 12 +++++++++++-
> >  util/coroutine-ucontext.c |  9 +++++++++
> >  .gitmodules               |  3 +++
> >  MAINTAINERS               |  6 ++++++
> >  meson_options.txt         |  2 ++
> >  subprojects/libucontext   |  1 +
> >  7 files changed, 50 insertions(+), 4 deletions(-)
> >  create mode 160000 subprojects/libucontext
> >
> > diff --git a/configure b/configure
> > index 34fccaa2ba..5f225894a9 100755
> > --- a/configure
> > +++ b/configure
> > @@ -1773,7 +1773,7 @@ Advanced options (experts only):
> >    --oss-lib                path to OSS library
> >    --cpu=CPU                Build for host CPU [$cpu]
> >    --with-coroutine=BACKEND coroutine backend. Supported options:
> > -                           ucontext, sigaltstack, windows
> > +                           ucontext, libucontext, sigaltstack, windows
>
> This approach mixes the concept of the coroutine backend (ucontext,
> sigaltstack, etc) with the optional libucontext library dependency.
>
> libucontext is not a coroutine backend. The patch had to introduce
> $coroutine_impl in addition to $coroutine in order to work around this.
> Let's avoid combining these two independent concepts into
> --with-coroutine=.
>
> I suggest treating libucontext as an optional library dependency in
> ./configure with explicit --enable-libucontext/--disable-libucontext
> options. Most of the time neither option will be provided by the user
> and ./configure should automatically decide whether libucontext is
> needed or not.
>
> > +case $coroutine in
> > +libucontext)
> > +  git_submodules="${git_submodules} subprojects/libucontext"
> > +  mkdir -p libucontext
>
> Why is this mkdir necessary?

That is a typo, will fix.

Thanks to all the feedback in this thread. I will shelve this patchset
for now and see if it's possible to fix ucontext on Darwin. Or if we
go with gcoroutine that would work as well. Either way it seems like
this isn't ready yet.

-j


  reply	other threads:[~2021-03-09 20:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09  3:26 [PATCH] coroutine: add libucontext as external library Joelle van Dyne
2021-03-09  9:35 ` Daniel P. Berrangé
2021-03-09  9:59   ` Joelle van Dyne
2021-03-09 10:20     ` Peter Maydell
2021-03-09 10:32       ` Daniel P. Berrangé
2021-03-09 10:24     ` Paolo Bonzini
2021-03-09 10:29       ` Daniel P. Berrangé
2021-03-09 10:42         ` Marc-André Lureau
2021-03-09 10:48           ` Paolo Bonzini
2021-03-09 15:38 ` Stefan Hajnoczi
2021-03-09 18:24   ` Joelle van Dyne [this message]
2021-03-09 21:21     ` Joelle van Dyne
2021-03-10  9:29       ` Daniel P. Berrangé
2021-03-10 16:32         ` Joelle van Dyne

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=CA+E+eSBiPAYtWyhMx07g8+ovON8hfF1kaoOLhUTUc0vWpYOtYA@mail.gmail.com \
    --to=j@getutm.app \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --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.