From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by sourceware.org (Postfix) with ESMTPS id 83F083858D37 for ; Fri, 28 Apr 2023 21:43:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 83F083858D37 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=google.com Received: by mail-qt1-x831.google.com with SMTP id d75a77b69052e-3ef34c49cb9so1127951cf.1 for ; Fri, 28 Apr 2023 14:43:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1682718182; x=1685310182; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=tu/bYEsnmFxtn9b4FRYi8ha5GViieOVveWjOocJIJQ0=; b=DbiqflVQ3jsPdz8QWJpW7d0dnSfxTwX4H+vTNLSh6P5ko1IOwHP3YxiorBhX8WhK31 kemcefekDtRSxAkyYAHgjpanyLb0k7f/bLwSLfctuz4nt79qcIyvOddaaOAmYO3PDSML 4buAXOATu/eZ/6Yv144vHec5yNQISKgEias3XrSVYk6unI6T5S8g8S4gH0f3QfLb66K8 8A9iwkGfNBtbUfrvUpFybGTL4Xc0YrM+QeKreB0eG0UgL9qyS2QVJp5T0n0vAu3D9NdY ruQiCkiCrd3Gcj9JW+QeFs2mrF4k4fwXDb0TLRcCOPM+rW2Mu3bgM4MAz9F1HSgB6vpn DTbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682718182; x=1685310182; h=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=tu/bYEsnmFxtn9b4FRYi8ha5GViieOVveWjOocJIJQ0=; b=GebM+gyeADMnpeIEIjT2vJu2yCfRNrhDCFugEvAa0sVaIWgHN6oTyNG37RDEi7xnLY vXZv5WdyEPDokwEnjfBm7KT9S7lIb1lvl53Gm4SXbiwudv4HioJvS9FxXSBEw0KWVykv QpRW6PTRbYQ0KoMgIXjVI9fyIGtN7FzkFT6WVAy/FARydMDjxv1X2zXyMNwuqrPkqzqi wLh2b/+NP2KUADB1pAR8/kMhmoZB8ZoIWNM+LdNEdH7mWTpsO0Up9nMYFpSe9O9tCuRa hAJM6Jm1nsRmuMce/dcGSQVZbUMFav0HDm2tDSDKcxfp9fysaJBm7D9Y6jeAefdgPkbK bGJw== X-Gm-Message-State: AC+VfDwGe9KbQul2/Ge+suKx/gMzG6p2qtnimKBG21YeCfO9F2KECd/u 9ORCbEk3VVAXuvH9EJTDNnm2Z/1l97b+lIWQcA7Tlw== X-Google-Smtp-Source: ACHHUZ4ckp+uYkJm1OSR66uHmTaXYPcGWoy+EhmAH968XEPGE1Xl8SJqst5vn7UP4MOdKeYYvvYC0SoYyCi0f9Bs4uE= X-Received: by 2002:a05:622a:1a0c:b0:3f1:bb90:c006 with SMTP id f12-20020a05622a1a0c00b003f1bb90c006mr18128qtb.11.1682718181776; Fri, 28 Apr 2023 14:43:01 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Hans Boehm Date: Fri, 28 Apr 2023 14:42:50 -0700 Message-ID: Subject: Re: [PATCH v5 06/11] RISC-V: Strengthen atomic stores To: Palmer Dabbelt Cc: jeffreyalaw@gmail.com, "Patrick O'Neill" , gcc-patches@gcc.gnu.org, gnu-toolchain@rivosinc.com, Vineet Gupta , Andrew Waterman , kito.cheng@sifive.com, Daniel Lustig , cmuellner@gcc.gnu.org, Andrea Parri Content-Type: multipart/alternative; boundary="0000000000007bd59305fa6c5bbe" X-Spam-Status: No, score=-16.8 required=5.0 tests=BAYES_00,DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,ENV_AND_HDR_SPF_MATCH,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL 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: --0000000000007bd59305fa6c5bbe Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The concern with making the new behavior non-default is of course that the generated code will eventually end up on an A.7-capable platform. An A.6-classic option for compiling code that will never run on a newer machine seems OK. But I'm not sure that seq_cst stores are dynamically frequent enough in C++ code for this to be worth the trouble. Unlike loads, they are also costly on x86, programmers may also have been somewhat trained to avoid them where possible. (And probably where not possible, too :-( ) Hans On Fri, Apr 28, 2023 at 10:43=E2=80=AFAM Palmer Dabbelt wrote: > On Fri, 28 Apr 2023 10:40:15 PDT (-0700), jeffreyalaw@gmail.com wrote: > > > > > > On 4/27/23 10:22, Patrick O'Neill wrote: > >> This change makes atomic stores strictly stronger than table A.6 of the > >> ISA manual. This mapping makes the overall patchset compatible with > >> table A.7 as well. > >> > >> 2023-04-27 Patrick O'Neill > >> > >> PR 89835 > > Should be "PR target/89835" > > > >> > >> gcc/ChangeLog: > >> > >> * config/riscv/sync.md: > > Needs some text here :-) > > > > > > I'm not objecting to this patch, but I think we've got an option > > question about whether or not this approach is too expensive for > > existing or soon arriving implementations. > > > > If the decision on that topic is to just pay the cost, then this patch > > is fine. If we decide to make compatibility optional to avoid the > > additional cost, then this will need suitable adjustments. > > IMO the only hardware that's going to be here by gcc-14 and to have > enough concurrency for these to matter is the Ventana stuff. I think > you're the only one who can figure out if these are slow, at least until > that stuff is availiable outside the lab. > > So are they too slow for you? > > > > > Jeff > --0000000000007bd59305fa6c5bbe--