Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2387666ioo; Sat, 28 May 2022 12:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJybLOy6HP+emyoJNCfHqC2qITHrkarojO5daJoQBEfZdWogdbW+CuokWDmFKsPRq24uc8L9 X-Received: by 2002:a17:902:f652:b0:156:701b:9a2a with SMTP id m18-20020a170902f65200b00156701b9a2amr48707182plg.14.1653764662561; Sat, 28 May 2022 12:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653764662; cv=none; d=google.com; s=arc-20160816; b=X9aJg4BvYpVpLK28erW+ZV8nUITuLbnWg91hh2SSlDgnNtNDixxu1r7EkWPL/dRnNu yDhde2KP/JiNxcVORAw4bzGAdJhNeifmegZFRfnQsegWTn2X2Z+fEOe/paq3A+z2O/RS 2P90YjrcOyx9LgDPwNRAWqohJOYgQf97tgsaOliKelXiAbgFpQ7in4TrEkj9wKKynzuG cCy7OIKquJ7mnI72E6jEtPZevEHGsTk44qUvnDESW2j7T9CY+SBGK/RhqslF+aVXWohQ w8Jf+MvXbFmj1Ls1U8e7/pbWaDz7LHwID9JlICXM4enubbkbfG7NVQj/e5Csl0BM/Rgd GbaQ== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=hrs6vCSpVE4aenCAretf8CCNdkuGkPSVkw6SjVLjCtQ=; b=QmCJG492xqbQHHyLwWYYa4i5+pY1+Xy9Hu/AEhedDNf+XUVS5enEEXS3Amguun7/Bf bnSohwBk4RtqpPThJEguc4SlQbS7yno7z2D/ei2Oqd07Y4NKv3pWVVZjzwNCG2X5vGXF HPVivrmy/DFWpiNSTOrWodZXz3nYzBJau6MpR/aYmXPlrdmjXaerMR51GawhNENC2yaf p3AL6HIUYsL9j6tN16umpAEmoZsVIbLPt2rf9d5Aeqa0HFmmqUOz+oqTlx9FXIEbNtAE 7AcBO9gJSmmtrVClP5PvfdHD+S3q5rKqn9d/DcecNctCDjWJXB1Sx4HdlClp517USyJI HJ4A== 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:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n14-20020a63590e000000b003fbc60e335esi4662969pgb.451.2022.05.28.12.04.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 12:04:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 9B1183DA76; Sat, 28 May 2022 11:45:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236286AbiE1N51 (ORCPT + 99 others); Sat, 28 May 2022 09:57:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236222AbiE1N5Y (ORCPT ); Sat, 28 May 2022 09:57:24 -0400 Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by lindbergh.monkeyblade.net (Postfix) with SMTP id EAA6AA46F for ; Sat, 28 May 2022 06:57:19 -0700 (PDT) Received: (qmail 126261 invoked by uid 1000); 28 May 2022 09:57:19 -0400 Date: Sat, 28 May 2022 09:57:19 -0400 From: Alan Stern To: Akira Yokosawa Cc: "Paul E. McKenney" , "Michael S. Tsirkin" , Will Deacon , 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: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Sat, May 28, 2022 at 01:15:30PM +0900, Akira Yokosawa wrote: > The term "data dependency barrier", which has been in > memory-barriers.txt ever since it was first authored by David Howells, > has become confusing due to the fact that in LKMM's explanations.txt > and elsewhere, "data dependency" is used mostly for load-to-store data > dependency. > > To prevent further confusions, do the following changes: > > - substitute "address-dependency barrier" for "data dependency barrier"; > - add note on the removal of kernel APIs for explicit address- > dependency barriers in kernel release v5.9; > - add note on the section title rename; > - use READ_ONCE_OLD() for READ_ONCE() of pre-4.15 (no address- > dependency implication) in code snippets; > - fix number of CPU memory barrier APIs; > - and a few more context adjustments. > > Note: Line break cleanups are deferred to a follow-up patch. > > Reported-by: "Michael S. Tsirkin" > Signed-off-by: Akira Yokosawa > Cc: "Paul E. McKenney" > Cc: Alan Stern > Cc: Will Deacon > Cc: Peter Zijlstra > Cc: Boqun Feng > Cc: Andrea Parri > Cc: Nicholas Piggin > Cc: David Howells > Cc: Daniel Lustig > Cc: Joel Fernandes > Cc: Jonathan Corbet > --- > This is a response to Michael's report back in last November [1]. > > [1]: "data dependency naming inconsistency": > https://lore.kernel.org/r/20211011064233-mutt-send-email-mst@kernel.org/ > > In the thread, I suggested removing all the explanations of "data dependency > barriers", which Paul thought was reasonable. > > However, such removals would require rewriting the notoriously > hard-to-grasp document, which I'm not quite up to. > I have become more inclined to just substitute "address-dependency > barrier" for "data dependency barrier" considering the fact that > READ_ONCE() has an implicit memory barrier for Alpha. > > This RFC patch is the result of such an attempt. > > Note: I made a mistake in the thread above. Kernel APIs for explicit data > dependency barriers were removed in v5.9. > I confused the removal with the addition of the barrier to Alpha's > READ_ONCE() in v4.15. > > Any feedback is welcome! > > Thanks, Akira This looks great! Thanks a lot for working on it. The way memory-barriers.txt misuses "data dependency" to mean "address dependency" has bothered me for a long time; I'm very glad that it will finally get cleaned up. Alan