Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp525068iol; Thu, 9 Jun 2022 08:23:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2z0vvp/NryLuUWYDWXMOwAaeDJAnJRJKW/lrWrDFN04RtMLAmygfnPebNrCbqfsSlebCb X-Received: by 2002:a05:6a00:179b:b0:51b:f51f:992e with SMTP id s27-20020a056a00179b00b0051bf51f992emr28614615pfg.60.1654788234586; Thu, 09 Jun 2022 08:23:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654788234; cv=none; d=google.com; s=arc-20160816; b=XIQgspm7E419frbao+BxkOktbOI2g7k6MaVN7QdEfcY6AncAwcZO8cJarabCKlgXy8 RAzYR7fe1tfIh90Rd7eVkLj+ISLJIj2YGt7DyqRgCFOGbQn8/aXdHDVbWPpsQHVj+dy4 daTr+Wck1w/zOm3zauKphwBIgnTUyLbAAojwwMT5lm/bnG1aMLbxy0uWQ4fb5eB02z+U Zwykbf/lTm1TEaOyANPfipjEgr1y3T6VNxwzBECXz2sTani4ZMq1V+moURf7fTLRdhu2 pekvsALbBU6xUouIsMq7spKHFmvxC8C5ba6KQvx2YtuMwOTE8Mg6eN3A/hPn34gaAos3 i86A== 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 :dkim-signature; bh=cyGnF2q7bBSV7BSBK4nd+/HslK61/4TqPcQmyx5ddH0=; b=J6gFXMH90iApyYkwBFmYgrTeExKLqtiDNu1Sj/g5oO63VH/qJBc+napyCE1bKun9DC rRH9L5USyLTQ5EwMF9inKrB08dB+6B7w6froUlg+2ZYU2evybxm/Q4tRwLRJp1jLJP7j aIpmTUUWr4wNKbIV+ejk2RS8ApKT+TbkGLsEhgcHyIw1hTVgKowhx2JSOnKuE3PuQBYS BIyQkGJVFiXzwzDQIqTmSEHFcl8G6GyW2ySmVuWoJVhpc1OOQU50bK6y80U7itNQVSSU LDrkIEDq3XPvnGWGI0Vf7YH0qzh+5Xk/X6xybmXmhEHKeHinLQvnR6Hqd9VOJpIkdd/G cucg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TmTCsIUc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a17090341c300b001620bc89356si35214257ple.482.2022.06.09.08.23.39; Thu, 09 Jun 2022 08:23:54 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=TmTCsIUc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242011AbiFIPHV (ORCPT + 99 others); Thu, 9 Jun 2022 11:07:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243905AbiFIPHO (ORCPT ); Thu, 9 Jun 2022 11:07:14 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DC5FA3AA9E8; Thu, 9 Jun 2022 08:07:12 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 983FFB82DE6; Thu, 9 Jun 2022 15:07:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDD14C34115; Thu, 9 Jun 2022 15:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654787230; bh=sr7x9nyyc6Swg+unCedL/fcC7RNlzrz9OBX0Z8PtW2w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TmTCsIUcRHP8cYOWzsESc7rdP8dbhJLzPFBVFPWqAQh8AyUbeVvXZOJZeMSIiGwLO 2nO1Fi+QMcB/5BmACfKI5lZlbhg+Y3lXtetC57VlZ8AzyaMRWUiYnLUAzYr5tNgmNj R8pmr7uV49KorN6IUaOMU/vZ2UfUiIQibv0FMbEoB6J8H6ECa7qBSLvSV25GKcnG9r ZMnxI/PSBktUAULW/sto0d0mgg9hd24kVRi66PbX0ypU8tM1QaKvvZb+H6NfGcf53T 604jOe1tP/s6daahxVEi+kSF2qLg+solsR8sWApJVC+Gmnxz8IpHItxxyCjwKqcItp xUs8ox/NpvFVg== Date: Thu, 9 Jun 2022 16:07:04 +0100 From: Will Deacon To: Akira Yokosawa Cc: Alan Stern , "Paul E. McKenney" , "Michael S. Tsirkin" , Peter Zijlstra , Boqun Feng , Andrea Parri , Nicholas Piggin , David Howells , Daniel Lustig , Joel Fernandes , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [RFC PATCH -lkmm] docs/memory-barriers: Fix inconsistent name of 'data dependency barrier' Message-ID: <20220609150703.GB3289@willie-the-truck> References: <20220607133432.GA32701@willie-the-truck> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Wed, Jun 08, 2022 at 11:00:46AM +0900, Akira Yokosawa wrote: > On Tue, 7 Jun 2022 10:34:08 -0400, Alan Stern wrote: > > On Tue, Jun 07, 2022 at 02:34:33PM +0100, Will Deacon wrote: > >> Alternatively, maybe we should be removing the historical stuff from the > >> document altogether if it's no longer needed. We don't have any occurrences > >> of read_barrier_depends() anymore, so why confuse people with it? > > > > How about relegating discussion of these barriers to a special > > "historical" or "niche architecture" section of the document? In a > > separate patch, of course. > > Another option would be to add a section on "Ordering guarantees by > dependencies", and explain three variants: address, data, and > control. We have only "control dependencies" section at the moment > and uses "data dependency" without properly defining it. > > Address dependencies are special in that they can provide load-to-load > ordering guarantees as well as those of load-to-store. > Alpha doesn't provide these guarantees at the architecture level, hence > the implicit address-dependency barrier in READ_ONCE(). > > Also, IIUC, arm64's READ_ONCE() is promoted to acquire-load when > LTO is enabled. It is to cope with the possible (but not observed > yet) transformation of address dependencies into control dependencies, > which can't provide load-to-load ordering guarantees. > > These points can be added later in memory-barriers.txt, but I'm > afraid I might not be up to such involved changes. I think we should try hard to avoid documenting how specific architectures implement the memory model (in this document, at least); it's likely to stagnate and it encourages people to rely on the behaviours of a specific architecture rather than the portable guarantees offered by the higher-level memory model. Will