Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp891184pxt; Thu, 5 Aug 2021 14:28:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwf6IDYNNaevJoOsPDemOeLEAXw/yPv/dRI5zs/coLnARjPwfmFMMg88wsE+ayVHEdnAz0 X-Received: by 2002:aa7:d519:: with SMTP id y25mr8918322edq.191.1628198927793; Thu, 05 Aug 2021 14:28:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628198927; cv=none; d=google.com; s=arc-20160816; b=R0Ee91I37iBHtZGhWL4I0kKxIAiOO48WggDI53PAnV+x6d4gyBJ8LlpBf3/h8KZJvD yJEAS23d1M3AxmBSy5tdtkFqAIpeY03jQZ1ghvdVWR3SGSYvZphZz4KaohiXUDQ6H8Qc OgP65nfe6D28ZfJV4ZzSweRFFgGfUA283B5KvGe0WvpT1JbNVCJtc+vAmBJfEgo4Upob y0WNNiSgWJZgSQGpTn46mPFyF4H4/83/icuvz6WwY0B4KYANToWbEI9wS2SKLvopn3Lh qaOp5wYV+OATmTD3OYPP8V9fDHnD6XPzlLgdWsMUi26huESM9g1sLC8jZauFkez/2vao hMEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4GIXLbE688UiGwYF3PBV92D2UXY9B6UhNYaDtO9ZMY0=; b=XQaoWs85VDe5XsDPD78MhhvZc5fTVpVCuUtpoGXzWp/bUsRP2WJz65lEZ/Xep/iSfP HEHvnbiRHs3tp8gWUHuSkUx70Bx4ydx+cY15zYSZDbnhF9NScUmjCyR6T0u+QOjmbm3z 3k8TGn4j6dbEwslZ+xqAkdbfzdjRAFRseOUwk7q1qYBr/scZbcd5VoaszuiB4g+EXufr 0OtL8VQO5bEZqMJnlXIOn5Akhr4cMHvwFAU2Rbov2TitJ6wsqJoj3iHAD2CjyBpUSMMm yPo5NNPhO+kja3gGj0TRRVOe/DY5nNbMDacnS23SGyOcSZHstNX6yYdD4soFq1tcqilU 5z2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z69si7094912ede.301.2021.08.05.14.28.23; Thu, 05 Aug 2021 14:28:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237055AbhHETsF (ORCPT + 99 others); Thu, 5 Aug 2021 15:48:05 -0400 Received: from netrider.rowland.org ([192.131.102.5]:57317 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S237113AbhHETsE (ORCPT ); Thu, 5 Aug 2021 15:48:04 -0400 Received: (qmail 436831 invoked by uid 1000); 5 Aug 2021 15:47:49 -0400 Date: Thu, 5 Aug 2021 15:47:49 -0400 From: Alan Stern To: Jade Alglave Cc: Will Deacon , Peter Zijlstra , Linus Torvalds , Segher Boessenkool , "Paul E. McKenney" , Andrea Parri , Boqun Feng , Nick Piggin , David Howells , Luc Maranget , Akira Yokosawa , Linux Kernel Mailing List , linux-toolchains@vger.kernel.org, linux-arch Subject: Re: [RFC] LKMM: Add volatile_if() Message-ID: <20210805194749.GA436115@rowland.harvard.edu> References: <20210605145739.GB1712909@rowland.harvard.edu> <20210606001418.GH4397@paulmck-ThinkPad-P17-Gen-1> <20210606012903.GA1723421@rowland.harvard.edu> <20210606115336.GS18427@gate.crashing.org> <20210606182213.GA1741684@rowland.harvard.edu> <20210607115234.GA7205@willie-the-truck> <20210730172020.GA32396@knuckles.cs.ucl.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210730172020.GA32396@knuckles.cs.ucl.ac.uk> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 30, 2021 at 06:20:22PM +0100, Jade Alglave wrote: > I hope this material can help inform this conversation and I would love > to hear your thoughts. Thoughts on section 3... The paragraph on Branching Effect is pretty meager. Exactly what effects does a conditional branch instruction generate? I imagine there's a register read of the flags register, to see whether the branch should be taken. And evidently there's a branch effect, which may take the register read as input but doesn't have any obvious outputs. Anything else? -- there don't seem to be any register writes. Why are Store Exclusive instructions explicitly disallowed in the definition of dependency through registers? Is this because ARM CPUs don't forward values written by such instructions to po-later reads? If so, why don't they? (Paul asked a similar question.) Since the recursive definition of dependency through registers starts with either a register write or intrinsic order of events in an instruction, it appears that there cannot be any dependency through registers starting from a branching effect. So why does the definition of address dependency talk about a dependency through registers from B4 (a branching effect) to R2? (Paul also asked about this -- does writing to the program counter get treated as a register write? But almost no instructions explicitly read from the program counter.) What is the whole point of the special handling of branching effects in the definition of address dependencies? It isn't obvious and the text doesn't explain it. Figure 26 includes a lot of terms that seem like herd primitives. They must be relatively new, because they aren't mentioned in the documentation that I've got. (I'm referring to such terms as iico_data, iico_ctrl, intrinsic, same-instance, DATA, and NDATA.) Are they explained anywhere? Way back in Section 1, various Intrinsic dependency relations were introduced. The reason for treating Intrinsic control dependencies specially seems to be that the CPU can speculate past such dependencies (though it would be nice if the text made this point explicitly). But why do you differentiate between data and order Intrinsic dependencies? Is this also related to some specific behavior of ARM CPUs? Alan