Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp453638imw; Fri, 15 Jul 2022 06:32:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1v7g4cOzSMvw4NrT7PKZSATZ5YWjEdXr1IWrwvxFWivDgXJmxhOAf9V69IdoXLrkm62Qvyf X-Received: by 2002:a9d:604:0:b0:61c:480b:b889 with SMTP id 4-20020a9d0604000000b0061c480bb889mr5346374otn.105.1657891959764; Fri, 15 Jul 2022 06:32:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657891959; cv=none; d=google.com; s=arc-20160816; b=tRjgX5qgpeTh5HJtcVRdVQOohSwSeS0261mfCKtN0jZXW3c2FAyGwgRoiQat9m1fIY eNzDQ5zyk3/Sg1sMPVTLk97haUgZA5ZapulbQfHt+rwL0VjccxnIQpvAzarOn1MytsBo tyA0co1jHsw/W1HuYPsToBIIOYCYFPJov3P4A7k/F/Jw1bzP6vwspBzPZ8LLg+olWOqi 67yjpAic09Qh+n7mUZryCHoxLtm93XXn4GgvKNP5epevPSemla78tW46soscvg1skMWc xP+jLblTERDYCg823BOy0xLoYvRjPTlMkx9hdeUukk+AxqTpZ/oF5w4A8bdG0kKnChTe 0Y6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=zITIZig3RKSjwvuQfCCErcusKsev00DQlMMAja+y1Ec=; b=Jy0l3esKaX/WW4aKl9KnCe2YmjyZcaWeA5YaTC2BsYB6IPo7Pqlh2cJL9d0s7d4uoy EI72YilqQORPj4DtDG2H3+ULJKjsGgd42ZzaxfgsAg5+nkBNU+GDBYkn5ZbiGpEXLYZ0 HaHCm7ChxNk3nw1ffh/GUUTYcUiDHdkPTtFHZ6g+sL8gb9s4uE54UnEhj3oeuFznp7V5 3CBZielZE6elJ7d+g7NvmeciD4hxJRN66Re/Yn4Aq4wa89ZqqfupBJeIPGmBoAb26aVL W6ZjYObma0mNFCvhwX3vJ+pv7ibid+d2fIu+V4sJ8DI5fJ6YOfDwepS5kGgFMNiOmkCD E7pg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t3-20020acaaa03000000b003352bbfeab6si3742192oie.134.2022.07.15.06.32.23; Fri, 15 Jul 2022 06:32:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233373AbiGON1d (ORCPT + 99 others); Fri, 15 Jul 2022 09:27:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiGON1a (ORCPT ); Fri, 15 Jul 2022 09:27:30 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 90D0878DDF for ; Fri, 15 Jul 2022 06:27:27 -0700 (PDT) Received: (qmail 39379 invoked by uid 1000); 15 Jul 2022 09:27:26 -0400 Date: Fri, 15 Jul 2022 09:27:26 -0400 From: Alan Stern To: Paul =?iso-8859-1?Q?Heidekr=FCger?= Cc: clang-built-linux , linux-toolchains@vger.kernel.org, Andrea Parri , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , "Paul E. McKenney" , Akira Yokosawa , Daniel Lustig , Joel Fernandes , Nathan Chancellor , Nick Desaulniers , Tom Rix , Palmer Dabbelt , LKML , linux-arch , Marco Elver , Charalampos Mainas , Pramod Bhatotia , Soham Chakraborty , Martin Fink Subject: Re: [PATCH RFC] tools/memory-model: Adjust ctrl dependency definition Message-ID: References: <20220615114330.2573952-1-paul.heidekrueger@in.tum.de> <50B9D7C1-B11D-4583-9814-BFFF2C80D8CA@in.tum.de> <04B4DBD6-1262-4905-9E85-9466FC104895@in.tum.de> <20F4C097-24B4-416B-95EE-AC11F5952B44@in.tum.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20F4C097-24B4-416B-95EE-AC11F5952B44@in.tum.de> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_PASS,SPF_PASS autolearn=no 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 On Fri, Jul 15, 2022 at 02:27:28PM +0200, Paul Heidekr?ger wrote: > I have just been thinking about how to word this patch; am I correct in > assuming that the LKMM does not deal with loop conditions? Or in other > words, there is no way for a loop condition to impose a ctrl dependency on > any WRITE_ONCE's in the loop body? It are only if and switch statements the > LKMM is concerned with in the case of ctrl dependencies? In theory, the LKMM does say that a loop condition imposes a control dependency on any memory accesses within the loop body. However, the herd7 tool has only very limited support for looping constructs, so in practice it's not possible to create suitable litmus tests with loops. Alan