From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oa1-x2a.google.com (mail-oa1-x2a.google.com [IPv6:2001:4860:4864:20::2a]) by sourceware.org (Postfix) with ESMTPS id 121F73858D28 for ; Sun, 23 Oct 2022 00:36:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 121F73858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oa1-x2a.google.com with SMTP id 586e51a60fabf-1321a1e94b3so8122905fac.1 for ; Sat, 22 Oct 2022 17:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=HY2nEo0UL292bjWyoS80nVUz0wiYOQbKgXWTG9E2U5E=; b=IejV3GO6gfUTrtoQYE9sjnEeNa1M1fbNV2g+RfyDN5jB5vy8ue4dchflMi8jVFfGQe Hc1o0TsjQQL0WHEoGhylLemR8Gq8kuHEMCMzqVWNCGxnbLzHCmsMpVqN4tRyYHEgvsj2 3yv0yPYWy4RKvdSttEJcKMqwTwoY6K+DP3iSb6e7nNQNDUQUW31K8eUDO4RY2KqBFtxi +ghFSdiq9mbG/9LgfcyvDYh1WTjsnTpzjVlX4sFpCA25J6kcmI4gnLcB13xudzFptjlH 6duV3Pt0DW+E5DCxVEXcaqMl8Y1OCGgPikbrEYXR91UevUbRjLsQsXQvx+Uu8vi2IAjq LsQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=HY2nEo0UL292bjWyoS80nVUz0wiYOQbKgXWTG9E2U5E=; b=55Si7oEOzU8b4tbRJCjZmKigNvANsRsK/WjdW6oD33jofCnO+47elwz3bC9i688BFB QMlxloMW9w7ifog1tiZ4Hzy3aWdCF7Q6FJuJ1B9t6VkNflqKOEng6/KuoZuPfA3MpXXI vO5k0rnf/ixR2xa0sF+o1OS0sox0LIV6zZtxjW94ynyrNVDbAx4N3cQZq94VujASAhVh YfsCpSuXffmS47lcs9ywXAvVYaT7tnJDyzzBKApazj6sOVu5GkIOSUVW/wWhkEQP5BZI 1JwTeJ0tCThJ0HdvgnppSNJGiQUgcI6pjIGAs0/F1MU+dqLx6yryjSnSorkbO9nGBiY0 XK5g== X-Gm-Message-State: ACrzQf2qdnPoQG3MeWOTcS+WlBOPNIm1tlbg074yS23kW6vl5DtvmRCw T9YMc6biApO52CsyqkuJuXdo5W2vG/+IPWgUpARxg1K+ X-Google-Smtp-Source: AMsMyM5YXUYlkmpJLEtc07S/GNxeFXDWgIz5760aBAiyccWvkvLwDnMNpNN60HnrVE/rR+u1RUAJ16bWcYpH04G2gAw= X-Received: by 2002:a05:6870:8a0f:b0:132:9b0c:df7c with SMTP id p15-20020a0568708a0f00b001329b0cdf7cmr33601904oaq.152.1666485413300; Sat, 22 Oct 2022 17:36:53 -0700 (PDT) MIME-Version: 1.0 References: <0ffaec7e83efdbd9a37049c52e92a9a0@autistici.org> In-Reply-To: From: NightStrike Date: Sat, 22 Oct 2022 20:36:42 -0400 Message-ID: Subject: Re: Adding a new thread model to GCC To: Jacek Caban Cc: i.nixman@autistici.org, GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Oct 21, 2022 at 8:33 AM Jacek Caban via Gcc-patches wrote: > > On 2022-10-21 11:44, Eric Botcazou via Libstdc++ wrote: > >>>/How does this compare with Eric B's proposal at />>>/https://gcc.gnu.= org/legacy-ml/gcc-patches/2019-06/msg01840.html ? />>//>>/My proposal was t= o reimplement (and extend) the native thread model />>/(win32) />>/instead = of adding a new one, the advantage being that you don't need an />>/extra /= >/> threading layer between GCC and Windows. /> > > I agree! > > I agree as well and I expressed that on mingw-w64 ML when the patch was i= ntroduced [1]. My main concern with the new threading model is that instead= of solving root of the problem, it introduces more fragmentation with no c= lear benefit. > > On top of that, mcfgthread library is way more invasive than it needs to = be. It requires maintaining per-thread struct and reimplements a number of = things instead of leveraging OS capabilities. Author also plans to make inv= asive changes to mingw-w64-crt, which go against it current approach of bei= ng agnostic to threading model. > > Jacek > > [1] https://sourceforge.net/p/mingw-w64/mailman/message/37719727/ FWIW, Eric's proposal makes more practical sense. Right now, people ship many permutations of the compiler: x86, x64, x86+x64 dw2, sjlj (rarely), seh win32, posix+winpthread This is not sustainable, and certain combinations are largely incompatible (which makes for instance providing a windows release of MySpecialLibrary.dll confusing). We used to have a matrix of combinations on the website, but I see that that's no longer present. In any case, it took a long time for sjlj to fall out of vogue (maybe old habits die hard?). That implies, to me, that winpthreads similarly won't be deprecated, it'll just be yet another set of archives to download and confuse people with.