All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: Konrad Weihmann <kweihmann@outlook.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] ruby: Do not use ucontext implementation for coroutines on musl/riscv
Date: Thu, 18 Feb 2021 07:36:21 -0800	[thread overview]
Message-ID: <CAMKF1srgBRXaZL_7tceYc8KWc25BKtu+gkZxdO9oEX9OBSid7A@mail.gmail.com> (raw)
In-Reply-To: <AM9PR09MB46420DA765CB5143252F750EA8859@AM9PR09MB4642.eurprd09.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1973 bytes --]

I don’t think it should be default since other options if implemented will
perform better so it’s a last resort solution so I would suggest to use it
only where it’s needed

On Thu, Feb 18, 2021 at 3:23 AM Konrad Weihmann <kweihmann@outlook.com>
wrote:

> I think I saw something similar on x86 builds (or was it arm32, don't
> remember) - so it might be worth discussing to make this setting the
> default and configurable to the user - thoughts?
>
> On 18.02.21 04:52, Khem Raj wrote:
> > The coroutine implementation in ruby has either arch specific
> > implementations or it falls back to slower ucontext API based
> > implementation assuming libc will provide the needed APIs, however musl
> > does not implement ucontext APIs like glibc, therefore fallback is to
> > use libucontext library on musl. However, libucontext is not ported to
> > riscv yet. which means on musl/riscv ruby is unbuildable, however a
> > third option is to use copy implementation for coroutines, which will be
> > not as good performance-wise, but it will do the job, therefore for now
> > use copy implementation for rv32/rv64 when using musl
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > ---
> >   meta/recipes-devtools/ruby/ruby_3.0.0.bb | 7 +++++++
> >   1 file changed, 7 insertions(+)
> >
> > diff --git a/meta/recipes-devtools/ruby/ruby_3.0.0.bb
> b/meta/recipes-devtools/ruby/ruby_3.0.0.bb
> > index 5e143ee87f..28e12c3cd7 100644
> > --- a/meta/recipes-devtools/ruby/ruby_3.0.0.bb
> > +++ b/meta/recipes-devtools/ruby/ruby_3.0.0.bb
> > @@ -32,6 +32,13 @@ EXTRA_OECONF_append_libc-musl = "\
> >       ac_cv_func_isinf=yes \
> >   "
> >
> > +EXTRA_OECONF_append_libc-musl_riscv64 = "\
> > +    --with-coroutine=copy \
> > +"
> > +EXTRA_OECONF_append_libc-musl_riscv32 = "\
> > +    --with-coroutine=copy \
> > +"
> > +
> >   do_install() {
> >       oe_runmake 'DESTDIR=${D}' install
> >   }
> >
> >
> >
> > 
> >
>

[-- Attachment #2: Type: text/html, Size: 2916 bytes --]

      reply	other threads:[~2021-02-18 15:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-18  3:52 [PATCH] ruby: Do not use ucontext implementation for coroutines on musl/riscv Khem Raj
2021-02-18 11:23 ` [OE-core] " Konrad Weihmann
2021-02-18 15:36   ` Khem Raj [this message]

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=CAMKF1srgBRXaZL_7tceYc8KWc25BKtu+gkZxdO9oEX9OBSid7A@mail.gmail.com \
    --to=raj.khem@gmail.com \
    --cc=kweihmann@outlook.com \
    --cc=openembedded-core@lists.openembedded.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 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.