Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp826506imm; Wed, 11 Jul 2018 11:36:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcMb21wZkoM+uJrhtHF4ghV6u52cpUSO6k/9bEYvNSQVCMG0yT0TbDIXilEYmhpBi81F4RQ X-Received: by 2002:a63:6fcc:: with SMTP id k195-v6mr27829592pgc.135.1531334205306; Wed, 11 Jul 2018 11:36:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531334205; cv=none; d=google.com; s=arc-20160816; b=N+kitrB4bAIYCSJtOPESRfUdYppVx213ODbBYY0kib99MhvQs4CtSN+Ns2TrOtnPVu 0rAep9pC3zqyBZiX3J6NChIQ0u9GA3x9bLHaJuP20tTn6D3wVaZTQpazTWf7GcDDSaFd TMLwJRxE5k9cEDGfQGVsprk/0zqPRJr0fvgqmUkG0tmYORgMvJAhHLSWYE7Sr/dWmOZP vpA0J0vUd9t9PW6sbkea6nYhAnb7F0YKUVet5wH0Mf0wu0ZeUv2zAEh56vO1o+txKLrg 60nkXFBpJyyqEAhvUZYkGf6T+o06o/Gj+F5xLS/LlF82GbQNBKY+5hPCkrsdwaTfmfYD GQIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=0NiVOQl85yPhLiBSFHhmGg9rxycMtbbw4a1glDcPLjc=; b=lGn3YVcwJ1ewTVIOKd1XQVn22DWMq+MOY/zSD85IbRzzgUcOBzoC6HPZgsTI/bXn6n WFnbAXhS2dOCSNiQorM6zHjjtsAxdCQwfXHhHReDhx9ROP0ZK/YWhNlkmRzLtP7wYj1c /u2rsLuqsNNuOMm2TAodcOxV6n3Njz6PWQjZc7P9oFjXpFFWwXvtXBN5OrbM+Cdu4YsM KsnK5jlPaTc8AuZMkJ8cC4squU+sD6TgwKPYAosyozBogyLC0THR7C6GGyjNtqkPBCko fmHnB6EohVNBL878HubGaa6KY+6mY2YNKEu7YowN7UDn8Qem3ztn4/kKwBHCwjy+2gIi u15w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KTWspeQN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 25-v6si19540945pgk.438.2018.07.11.11.36.30; Wed, 11 Jul 2018 11:36:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=KTWspeQN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389517AbeGKP7B (ORCPT + 99 others); Wed, 11 Jul 2018 11:59:01 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:52280 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732411AbeGKP7B (ORCPT ); Wed, 11 Jul 2018 11:59:01 -0400 Received: by mail-wm0-f67.google.com with SMTP id w16-v6so2881323wmc.2 for ; Wed, 11 Jul 2018 08:54:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=0NiVOQl85yPhLiBSFHhmGg9rxycMtbbw4a1glDcPLjc=; b=KTWspeQN5zZzDEdpFmgNsgAHsBQGjOLm6Gv60DBSYHYIxqSR4Ekl0F8lt+QKlSu9Dk +/Tui4stQ74EswHDMXRGMTbyi2vodfx0OrfmN/qlKc/quuKSsXywW9/xw6sjHae1mWTB vZ55wYL2B+CcscN3Zm5JP35t3NZQZjwrucz4M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=0NiVOQl85yPhLiBSFHhmGg9rxycMtbbw4a1glDcPLjc=; b=k1MbGNxDIWopUJP70mbaF8TUoHxilHrZmOcRkyIEiJXZKtFwJeclEIW5k0qG8CzW2y U09ugkabDnBreyOXQoS41MUHcJ/HbL8Tv2J/llXppkpRjwHDLpf6mcxZ8TeMsTSX4ScO zOhn/4Dq8F8AEVyu6SvXfE9mu4EYED/SOaJKZISh403cHb7exR/ZY5FwB21OUa9/9e2S QReH2lJZ3pG7uI2SVMEZLy93seL4UVTGIBvKoCtixpJt3+BLjLANqVWa0/3kqDOToNgI 7vSwyHiXWL7+quF4toGs7HQyfL8WfMNFWG30dezZXowC91T4TRNgbLPz8B9mH0vxfrs/ aqow== X-Gm-Message-State: APt69E2ejo0Fupa75PVLWGAMMqLLLmr61DFPDTngXxBRcKwjN7YezsWY 9FDz2c8VaMYjthNFQanfnaRlHA== X-Received: by 2002:a1c:7c13:: with SMTP id x19-v6mr19106956wmc.27.1531324441364; Wed, 11 Jul 2018 08:54:01 -0700 (PDT) Received: from andrea (85.100.broadband17.iol.cz. [109.80.100.85]) by smtp.gmail.com with ESMTPSA id b190-v6sm3712157wma.24.2018.07.11.08.54.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jul 2018 08:54:00 -0700 (PDT) Date: Wed, 11 Jul 2018 17:53:55 +0200 From: Andrea Parri To: "Paul E. McKenney" Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, Alan Stern , Will Deacon , Peter Zijlstra , Boqun Feng , Nicholas Piggin , David Howells , Jade Alglave , Luc Maranget , Akira Yokosawa , Daniel Lustig , Jonathan Corbet Subject: Re: [PATCH] doc: Replace smp_cond_acquire() with smp_cond_load_acquire() Message-ID: <20180711154830.GA14348@andrea> References: <1531216943-6382-1-git-send-email-andrea.parri@amarulasolutions.com> <1531314530-11624-1-git-send-email-andrea.parri@amarulasolutions.com> <20180711153840.GS3593@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180711153840.GS3593@linux.vnet.ibm.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 11, 2018 at 08:38:40AM -0700, Paul E. McKenney wrote: > On Wed, Jul 11, 2018 at 03:08:50PM +0200, Andrea Parri wrote: > > Amend commit 1f03e8d2919270 ("locking/barriers: Replace smp_cond_acquire() > > with smp_cond_load_acquire()") by updating the documentation accordingly. > > Also remove some obsolete information related to the implementation. > > > > Signed-off-by: Andrea Parri > > Cc: Alan Stern > > Cc: Will Deacon > > Cc: Peter Zijlstra > > Cc: Boqun Feng > > Cc: Nicholas Piggin > > Cc: David Howells > > Cc: Jade Alglave > > Cc: Luc Maranget > > Cc: "Paul E. McKenney" > > Cc: Akira Yokosawa > > Cc: Daniel Lustig > > Cc: Jonathan Corbet > > --- > > Documentation/memory-barriers.txt | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > I have queued this for further review, thank you! Just to confirm, > the reason that the old passage was obsolete is because ARMv8 implements > smp_cond_load_acquire() as a straight acquire load, correct? Thanks. Yes; the generic code builds on a control dependency and an smp_acquire__after_ctrl_dep() (which defaults to smp_rmb()); but the required ordering on arm64 is given by (its) smp_load_acquire(). I thought that entering this level of details (and keeping it up-to- date ;) wasn't really worth/needed for this high-level doc. Andrea > > Thanx, Paul > > > diff --git a/Documentation/memory-barriers.txt b/Documentation/memory-barriers.txt > > index 0d8d7ef131e9a..c1d913944ad8b 100644 > > --- a/Documentation/memory-barriers.txt > > +++ b/Documentation/memory-barriers.txt > > @@ -471,8 +471,7 @@ And a couple of implicit varieties: > > operations after the ACQUIRE operation will appear to happen after the > > ACQUIRE operation with respect to the other components of the system. > > ACQUIRE operations include LOCK operations and both smp_load_acquire() > > - and smp_cond_acquire() operations. The later builds the necessary ACQUIRE > > - semantics from relying on a control dependency and smp_rmb(). > > + and smp_cond_load_acquire() operations. > > > > Memory operations that occur before an ACQUIRE operation may appear to > > happen after it completes. > > -- > > 2.7.4 > > >