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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BA108ECAAD4 for ; Sat, 3 Sep 2022 15:54:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230018AbiICPyg (ORCPT ); Sat, 3 Sep 2022 11:54:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229698AbiICPya (ORCPT ); Sat, 3 Sep 2022 11:54:30 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 5F618389D for ; Sat, 3 Sep 2022 08:54:28 -0700 (PDT) Received: (qmail 304901 invoked by uid 1000); 3 Sep 2022 11:54:27 -0400 Date: Sat, 3 Sep 2022 11:54:27 -0400 From: Alan Stern To: Paul =?iso-8859-1?Q?Heidekr=FCger?= Cc: 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 , Michael Ellerman , LKML , linux-arch , Marco Elver , Charalampos Mainas , Pramod Bhatotia , Soham Chakraborty , Martin Fink Subject: Re: [PATCH v3] tools/memory-model: Weaken ctrl dependency definition in explanation.txt Message-ID: References: <20220902211341.2585133-1-paul.heidekrueger@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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Sep 03, 2022 at 01:41:34PM +0200, Paul Heidekrüger wrote: > On 3. Sep 2022, at 03:27, Alan Stern wrote: > > > On Fri, Sep 02, 2022 at 09:13:40PM +0000, Paul Heidekrüger wrote: > >> +Finally, a read event X and another memory access event Y are linked by > >> +a control dependency if Y syntactically lies within an arm of an if > >> +statement and X affects the evaluation of the if condition via a data or > >> +address dependency (or similarly for a switch statement). Simple > >> +example: > >> > >> int x, y; > > Hang on, shouldn't this read "a write event" instead of "another memory > access event"? Control dependencies only provide ordering from READ_ONCE to > WRITE_ONCE, not from READ_ONCE to (READ | WRITE)_ONCE? > > Or am I missing something? Whoops, you're right. Somehow I missed that. Go ahead and change it; you can keep by S-O-B. Alan