From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 25A99C433E0 for ; Tue, 9 Mar 2021 10:44:53 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6BFC265225 for ; Tue, 9 Mar 2021 10:44:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6BFC265225 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:34804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJZr9-0003oC-C3 for qemu-devel@archiver.kernel.org; Tue, 09 Mar 2021 05:44:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:52282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJZpP-0002zt-Rb for qemu-devel@nongnu.org; Tue, 09 Mar 2021 05:43:03 -0500 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]:41505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJZpM-0004il-BE for qemu-devel@nongnu.org; Tue, 09 Mar 2021 05:43:03 -0500 Received: by mail-ej1-x632.google.com with SMTP id lr13so26482798ejb.8 for ; Tue, 09 Mar 2021 02:42:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YDP3a5Ry+S8jW1KUXSyVYnd/WEBTlzs9Loq/BnY7RdI=; b=sjBhEq8+7A9wj2ex2RAkNT7TEnY6Xw+RpJOgAA6EQJQwtnB0gd7Ngt+aWHyPmYW35e AEU1kBFNO+BEHc/jv1Hy9piH0ETJilKcFfwxaKSzAbgoW5pdRO3QgAYD+vWhcaWBwxpn 7J7UCYFZqXQnSn3VDj+gknhzf106cZmYrF2DKac4fUcPYwadg96o+go+0TDcg4KzOXDc sWitrmLfYBtpivn+kx4bvsbOywXb1DmD/Bzt+GLr7Ws8thTmcJsCOSxoYirub6mNJdj2 WW8u/iQ45l0xRBRnquPaeXZjZcNEJ4ggDuw/oQsRDhKYAwOZUXZyQkASMsoPCxRcPX0B dfgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YDP3a5Ry+S8jW1KUXSyVYnd/WEBTlzs9Loq/BnY7RdI=; b=LG4wXNvLCkKoCPqN6AV9vcO2eSi0NTo3h5OAQ1FbLzA/2ezBWAoFiy6LhoJICg8ctW gfGHCm+/JcaDc3ccIfg6ke+rFTYqEYgQy3l+cnjIVO0iUosXEtwF8KWT36PdO7cIsro6 sSfBeJk6eOdtem/rBfamgOWJol65NQ4fbFNMekRIm7XJXtAjgZxmc2bsxIX4XOr+ON3o ZBSPIZhzAS9nzVlUqoNxkHMeSK7sptFtmPcGdLtNDaHRKhv5y79ASzjUNPqHGCFpdOkl BZnECr5IQldpUmysZCDyGa85+ed96grYDF76d00oVuDtbzqXA7ZyHgdeZKBoUJwvSVnD IKeA== X-Gm-Message-State: AOAM5308C9cBxD6LZ5TjhV0Iyzs6UnpvUgCWsh7ZqeaEVj89JSBe/Jof BizeYdo3Js4wER1s03T6SqcnwjvzRoh9Zhq9Wlg= X-Google-Smtp-Source: ABdhPJz5+1mFFzxtTpSRO5y7lQIw6DxVuR+WXRE1N7y/oUrNvFx7cotXzXJXcjcasY1UMTyJ8buba6YbIKqZza+n5ss= X-Received: by 2002:a17:906:cf90:: with SMTP id um16mr19945770ejb.389.1615286577955; Tue, 09 Mar 2021 02:42:57 -0800 (PST) MIME-Version: 1.0 References: <20210309032637.41778-1-j@getutm.app> <537a6a0e-431b-3920-c8dc-290e4e3d8895@redhat.com> In-Reply-To: From: =?UTF-8?B?TWFyYy1BbmRyw6kgTHVyZWF1?= Date: Tue, 9 Mar 2021 14:42:46 +0400 Message-ID: Subject: Re: [PATCH] coroutine: add libucontext as external library To: =?UTF-8?Q?Daniel_P=2E_Berrang=C3=A9?= Content-Type: multipart/alternative; boundary="000000000000b0860b05bd183647" Received-SPF: pass client-ip=2a00:1450:4864:20::632; envelope-from=marcandre.lureau@gmail.com; helo=mail-ej1-x632.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Peter Maydell , QEMU Developers , Joelle van Dyne , Stefan Hajnoczi , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" --000000000000b0860b05bd183647 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi On Tue, Mar 9, 2021 at 2:36 PM Daniel P. Berrang=C3=A9 wrote: > On Tue, Mar 09, 2021 at 11:24:08AM +0100, Paolo Bonzini wrote: > > On 09/03/21 10:59, Joelle van Dyne wrote: > > > Does it make a difference if this is provided as an option and not as > > > a replacement? Would it make sense to add some warning at configure > > > time? Right now none of the concurrency backends are supported on iOS > > > and it's possible support will go away on macOS as well in the future= . > > > QEMU would not be able to run at all. > > > > The alternative is to use a handwritten backend, it would be necessary > > anyway for CET support. > > > > You can find the patches at > > https://patchew.org/QEMU/20190504120528.6389-1-pbonzini@redhat.com/ > > It sure would be nice if someone could take the QEMU coroutine impls > and spin them out into a "libcoroutine" for reuse. We use coroutines > across QEMU, SPICE-GTK, GTK-VNC and all have different featureset and > QEMU's seems the best in general, especially as you start adding the > CET stuff. > I tried it years ago: https://github.com/elmarco/gcoroutine/ (there were patches for spice-gtk & qemu at that time) If I remember correctly, there were objections because we wanted to have an implementation close to QEMU, so we could easily extend it, or add custom optimizations. Everybody loves submodules now, right? Maybe it's worth another try. --=20 Marc-Andr=C3=A9 Lureau --000000000000b0860b05bd183647 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi

On Tue, Mar 9, 2021 at 2:36 PM Daniel P. Berr= ang=C3=A9 <berrange@redhat.com> wrote:
On = Tue, Mar 09, 2021 at 11:24:08AM +0100, Paolo Bonzini wrote:
> On 09/03/21 10:59, Joelle van Dyne wrote:
> > Does it make a difference if this is provided as an option and no= t as
> > a replacement? Would it make sense to add some warning at configu= re
> > time? Right now none of the concurrency backends are supported on= iOS
> > and it's possible support will go away on macOS as well in th= e future.
> > QEMU would not be able to run at all.
>
> The alternative is to use a handwritten backend, it would be necessary=
> anyway for CET support.
>
> You can find the patches at
>
https://patchew.org/QEMU/201= 90504120528.6389-1-pbonzini@redhat.com/

It sure would be nice if someone could take the QEMU coroutine impls
and spin them out into a "libcoroutine" for reuse. We use corouti= nes
across QEMU, SPICE-GTK, GTK-VNC and all have different featureset and
QEMU's seems the best in general, especially as you start adding the CET stuff.

I tried it years ago: https://github.com/elmarco/gco= routine/ (there were patches for spice-gtk & qemu at that time)
=

If I remember correctly, there were objections be= cause we wanted to have an implementation close to QEMU, so we could easily= extend it, or add custom optimizations.

Ever= ybody loves submodules now, right? Maybe it's worth another try.



--
Marc-Andr=C3=A9 Lureau
--000000000000b0860b05bd183647--