Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1230138rdf; Sat, 4 Nov 2023 11:21:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9N3CmODGKDOOmSTOa8XLlbTU7A5bvXrJAjRQ0bSbXIwOanOClAroGcFJGseElnbpdUJUF X-Received: by 2002:a17:902:6803:b0:1bf:c59:c944 with SMTP id h3-20020a170902680300b001bf0c59c944mr18894490plk.22.1699122070692; Sat, 04 Nov 2023 11:21:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699122070; cv=none; d=google.com; s=arc-20160816; b=RardinUQ62WAdS3ZXPBKQxhjIhhCAilZa5EV1NFynuG3pRgZDInxyAnbipKVj3fwe2 I0FOemyULKe137aodlXU4FqMtiIoXlmVZ1V29SX6Z3vv8U/xN4H4kESxZkBd6Kkm81d5 3EWgwc94syxe/Q73x9qZQyrPRpEo5Q6qGwigCNT2siJbraiGJuNI44XscIZ5UUL+XHS6 iIXBw/P7+Hbza5hFCo8WYU9KhePolade6SA1yD3KdlVt7zA7DO6GEJpJK/mNVfmrdSGx 8LFayEqyAsdC5hwhxUbngXr5YRltV9T3hfiIcasi0eVO5l0Sh615cqHL0oQd5latFqSn yfUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:user-agent:mime-version:date:message-id; bh=3Y7+FSYgLDZvoMk/jaHFQOu9VW44B5AoPw/1euQICqk=; fh=06mObC7GrUkqj7Nk8gdlz43gmRMjem0wPAUlmETjfM0=; b=zig91PFyiSYdeGrYNMWhKk6ZXCU4lXdC8gqQ7w+Lvocz8hUiCS/Sl4u3/f7ayoJDP1 QzeMsh73sYJcBAVDvq6dbGH74wU0ksA7jJG7mZ6fwRGfa+B8aHyY+2RxhHTWhtRioU3Z 5YeLU50l8+mGynMSOnJskIhbRVlaUQmznp9YvTmmJEg+1QnwR411ZyE1x58W50IQ4awn NmvoZhK80bxuvgy8o/DR3eB1CrpuurvgCwqypK/xftD+WI7fO0TGOZnlM0SJNSHqTNUB /3Y16reBE4ob3Oj/TR6BYpYRXzWs9W3HmbyqF1J3BhlSp7jFedyVTEMCuSHPc6/9GIAc Fsiw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id d5-20020a170903230500b001cc50114667si4206614plh.551.2023.11.04.11.21.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 11:21:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 7520D80486A8; Sat, 4 Nov 2023 11:21:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229514AbjKDSVI (ORCPT + 99 others); Sat, 4 Nov 2023 14:21:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjKDSVH (ORCPT ); Sat, 4 Nov 2023 14:21:07 -0400 Received: from frasgout11.his.huawei.com (frasgout11.his.huawei.com [14.137.139.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C438D6; Sat, 4 Nov 2023 11:21:03 -0700 (PDT) Received: from mail02.huawei.com (unknown [172.18.147.229]) by frasgout11.his.huawei.com (SkyGuard) with ESMTP id 4SN5Ds5dncz9xyt4; Sun, 5 Nov 2023 02:07:41 +0800 (CST) Received: from [10.45.148.63] (unknown [10.45.148.63]) by APP1 (Coremail) with SMTP id LxC2BwD35HRri0ZlgEUKAA--.9205S2; Sat, 04 Nov 2023 19:20:41 +0100 (CET) Message-ID: <4f5228b6-839c-9e04-bf7c-34fb8e25fd13@huaweicloud.com> Date: Sat, 4 Nov 2023 19:20:27 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [isocpp-parallel] OOTA fix (via fake branch-after-load) discussion To: "Alglave, Jade" , "will@kernel.org" , "catalin.marinas@arm.com" , "linux@armlinux.org.uk" , "mpe@ellerman.id.au" , "npiggin@gmail.com" , "palmer@dabbelt.com" , "parri.andrea@gmail.com" , "paulmck@kernel.org" Cc: "linux-kernel@vger.kernel.org" , "linux-toolchains@vger.kernel.org" , "peterz@infradead.org" , "boqun.feng@gmail.com" , "davidtgoldblatt@gmail.com" , viktor@mpi-sws.org References: From: Jonas Oberhauser In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID: LxC2BwD35HRri0ZlgEUKAA--.9205S2 X-Coremail-Antispam: 1UD129KBjvJXoWxXF4fCrWxZw1kZw18WrW3Wrg_yoWrAw15pa yfKr47Cw4DXrn3Jw1DKr4Uua4Yv3yktr43Krs8G348Ar90kr1IqF1fKa1FvFyDJryYkr4a qF4jg3s2g3sxArJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUv2b4IE77IF4wAFF20E14v26r4j6ryUM7CY07I20VC2zVCF04k2 6cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rwA2F7IY1VAKz4 vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xIIjxv20xvEc7Cj xVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8JVWxJwA2z4x0Y4vEx4A2jsIEc7CjxV AFwI0_Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40E x7xfMcIj6xIIjxv20xvE14v26r1j6r18McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x 0Yz7v_Jr0_Gr1lF7xvr2IY64vIr41lFIxGxcIEc7CjxVA2Y2ka0xkIwI1lc7I2V7IY0VAS 07AlzVAYIcxG8wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c 02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_ GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7 CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6rW3Jr0E3s1lIxAIcVC2z280aVAF wI0_Jr0_Gr1lIxAIcVC2z280aVCY1x0267AKxVW8JVW8JrUvcSsGvfC2KfnxnUUI43ZEXa 7IU1zuWJUUUUU== X-CM-SenderInfo: 5mrqt2oorev25kdx2v3u6k3tpzhluzxrxghudrp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 04 Nov 2023 11:21:09 -0700 (PDT) Thanks Jade. I agree with the position you linked to in that the move is... unwise. IMO, for a high-level language like C, if you need to outrule OOTA, just declare it impossible (Viktor, in CC, made this suggestion a while ago) by a "no OOTA axiom". BTW, is there at least a proof that just making relaxed atomics ordered in this way rules out OOTA in programs that contain non-atomics? Or can we have something like the LKMM OOTA example I sent around last year? best wishes, jonas Am 11/3/2023 um 6:02 PM schrieb Alglave, Jade: > Dear all, (resending because I accidentally sent it in html first, sorry) > > Arm’s official position on the topic can be found in this recent blog: > https://community.arm.com/arm-community-blogs/b/architectures-and-processors-blog/posts/arm-technical-view-on-relaxed-atomics > > Please do reach out to memory-model@arm.com if there are any questions. > Thanks, > Jade > > > From: Paul E. McKenney > Sent: 27 October 2023 22:08 > To: Alglave, Jade ; will@kernel.org ; catalin.marinas@arm.com ; linux@armlinux.org.uk ; mpe@ellerman.id.au ; npiggin@gmail.com ; palmer@dabbelt.com ; parri.andrea@gmail.com > Cc: linux-kernel@vger.kernel.org ; linux-toolchains@vger.kernel.org ; peterz@infradead.org ; boqun.feng@gmail.com ; davidtgoldblatt@gmail.com > Subject: Fw: [isocpp-parallel] OOTA fix (via fake branch-after-load) discussion > > ⚠ Caution: External sender > > > Hello! > > FYI, unless someone complains, it is quite likely that C++ (and thus > likely C) compilers and standards will enforce Hans Boehm's proposal > for ordering relaxed loads before relaxed stores. The document [1] > cites "Bounding data races in space and time" by Dolan et al. [2], and > notes an "average a 2.x% slow down" for ARMv8 and PowerPC. In the past, > this has been considered unacceptable, among other things, due to the > fact that this issue is strictly theoretical. > > This would not (repeat, not) affect the current Linux kernel, which > relies on volatile loads and stores rather than C/C++ atomics. > > To be clear, the initial proposal is not to change the standards, but > rather to add a command-line argument to enforce the stronger ordering. > However, given the long list of ARM-related folks in the Acknowledgments > section, the future direction is clear. > > So, do any ARMv8, PowerPC, or RISC-V people still care? If so, I strongly > recommend speaking up. ;-) > > Thanx, Paul > > [1] https://lukegeeson.com/blog/2023-10-17-A-Proposal-For-Relaxed-Atomics/ > [2] https://dl.acm.org/doi/10.1145/3192366.3192421 > > ----- Forwarded message from David Goldblatt via Parallel ----- > > Date: Fri, 27 Oct 2023 11:09:18 -0700 > From: David Goldblatt via Parallel > To: SG1 concurrency and parallelism > Reply-To: parallel@lists.isocpp.org > Cc: David Goldblatt > Subject: [isocpp-parallel] OOTA fix (via fake branch-after-load) discussion > > Those who read this list but not the LLVM discourse might be interested in: > - This discussion, proposing `-mstrict-rlx-atomics`: > https://discourse.llvm.org/t/rfc-strengthen-relaxed-atomics-implementation-behind-mstrict-rlx-atomics-flag/74473 > to enforce load-store ordering > - The associated blog post here: > https://lukegeeson.com/blog/2023-10-17-A-Proposal-For-Relaxed-Atomics/ > > - David > > _______________________________________________ > Parallel mailing list > Parallel@lists.isocpp.org > Subscription: https://lists.isocpp.org/mailman/listinfo.cgi/parallel > Link to this post: http://lists.isocpp.org/parallel/2023/10/4151.php > > > ----- End forwarded message -----