Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp915624imm; Wed, 4 Jul 2018 08:07:00 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdOiv67qbUat4la3flfBRxsime8HWwuVkrG71lMKCZzu5E3q0NQFyYikxKiQcqFVxSWu5e4 X-Received: by 2002:a62:6d42:: with SMTP id i63-v6mr2568450pfc.41.1530716820746; Wed, 04 Jul 2018 08:07:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530716820; cv=none; d=google.com; s=arc-20160816; b=kyp4Rexe+5vtyZDaLl1GTd38DORuvibND9SmPkwn7RAHV8NBHipoQDnKYJ8EJRO9+b bbmXcggq5dCTo8H9j3E89uCA/xecYng87dBGpvllZ+4ROPnvA76tEIc3dMMq6qaaV394 9vh3VT/jhcwGHkbtV0K0+WWE6vrX5onCvqTLgxbTaDdWxXXKDNIZhEvxNDf+39gr7EOF IYsn6FgBSM2+zRzRaq+qbZNYi+YdwnOSmyuU0k0HQKl6ErpvUEM3xOCBoYuHo3qedl1k 8TwN/Ol9hXXBRinSbhIckDKuXqwVxXVMWO/kuefSw3CUS7VlkI/E216IA0+U8EI9R/Nz tp1g== 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:arc-authentication-results; bh=divZ6LkDcuE3mvHZsQYxXWoNUkBnYYOUZ8AhhlVFdZk=; b=TOQwiB9t8FsZc+3vWo8LUpOBZtZcXxQvbIJ6E5bUQSTGQmAc2eHeUKgusJcYY5hHGs aXp0FFXvFGB4DdEUg7ZuMnyIsfaoNE7toa6UdfsIAWBGtcT7qXTNYtaSQs/J7x/3l3u5 T1SSsCKzIUb4lmTHFsGel9I08Vi0lZWPiOR/lpr3g/WI/QzOXZ9Wmbmbxvzd6jvsgHPr fY1tSXFrxGgPSQjMLexMCmNHpT9D/d9LES49sNure/UOGEiUSMtmVYKUOetOAefvOg+K H4vBgY2U9jBhUa25GWCW4Ae9Sc2SKX348okSb3Mw2eelSvUqNqmzv7GqmZIi76V3WJ2m iQ2A== ARC-Authentication-Results: i=1; mx.google.com; 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 k9-v6si3353537pga.539.2018.07.04.08.06.45; Wed, 04 Jul 2018 08:07:00 -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; 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 S1752578AbeGDPGH (ORCPT + 99 others); Wed, 4 Jul 2018 11:06:07 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:39030 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752218AbeGDPGH (ORCPT ); Wed, 4 Jul 2018 11:06:07 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A2E1D18A; Wed, 4 Jul 2018 08:06:06 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 72C313F5A0; Wed, 4 Jul 2018 08:06:06 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 68D9F1AE189D; Wed, 4 Jul 2018 16:06:46 +0100 (BST) Date: Wed, 4 Jul 2018 16:06:46 +0100 From: Will Deacon To: Mark Rutland Cc: linux-kernel@vger.kernel.org, peterz@infradead.org, boqun.feng@gmail.com, Andrea Parri Subject: Re: [PATCHv2 06/11] atomics/treewide: rework ordering barriers Message-ID: <20180704150645.GJ4828@arm.com> References: <20180625105952.3756-1-mark.rutland@arm.com> <20180625105952.3756-7-mark.rutland@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180625105952.3756-7-mark.rutland@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 25, 2018 at 11:59:47AM +0100, Mark Rutland wrote: > Currently architectures can override __atomic_op_*() to define the barriers > used before/after a relaxed atomic when used to build acquire/release/fence > variants. > > This has the unfortunate property of requiring the architecture to define the > full wrapper for the atomics, rather than just the barriers they care about, > and gets in the way of generating atomics which can be easily read. > > Instead, this patch has architectures define an optional set of barriers, > __atomic_mb_{before,after}_{acquire,release,fence}(), which > uses to build the wrappers. Looks like you've renamed these in the patch but not updated the commit message. Also, to add to the bikeshedding, would it worth adding "rmw" in there somewhere, e.g. __atomic_post_rmw_fence, since I assume these only apply to value-returning stuff? Will