Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp2951674imm; Thu, 24 May 2018 19:45:45 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo2FEtAxlfPqRG5U/MLF40Au6Jz1TnQBiSv8cHMCvM/9ASZvViofBVNNfpXQIW4VJCrgXeW X-Received: by 2002:a17:902:2848:: with SMTP id e66-v6mr608651plb.319.1527216345287; Thu, 24 May 2018 19:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527216345; cv=none; d=google.com; s=arc-20160816; b=OBb153Z0Ig8/ensMFOSZqIdEuRv+d+vekBv3+HHE+hURiLEHtW03hrAdSpL7FuuTIe r2RP6HoEEq4v3qVHjc/RMi2ClcRmG4ueJUQ1wA3wAtLMlXpWAKHFCD/JiAnEXQdeFWl5 JevAq/R7AHHzrlrd99EWMyiwQwKfDghH2ae1zmXjdSwT/DSpjXoXYZwKKcOR2rM0rY4o wMf9rSHgI+owJKMMu80n+RtzDCC+vfhen6riLk7kYevktfq2JRa3wwYEQL59f9NSxGWj l2RbHQOlo6tw+UVhYfkXx06iQczC4ogwqx/zN+VZ5rfgxlzqnfdRSWTc9xjErfGBmf7Y VI9w== 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=LP7V/R7RqeQsZXbUv704jUnjq+rVIJsN9Wsaoeo/5Yc=; b=m55Hr6rgY0vZCU/1okNTxkpDJDHw5UXC/xuYLTgiEWue+u6CPxb7KhDTLX+8ySRaTe /miY0ws9wQy9tonb1xO0o5vxuwB4TAVpIPWMMO0pddG3nRnMYo7zGqxpezBTtTilSkYI x0gAMZnV6jBAIGXip3PVXq0IEeSHRUl2ZxQCbG8bR8pBZp0gSunaGXxVW//VzR/8hEc0 30j3ASir6lTuQgKED0hDp3g8wP8eQpxVFEUO708x1GwrJ3sEbGtOZoeqTkkubzzQq/qA bra/Nc7hayNnJPs/SFlcT+TGL2FP1MWdpSVj0woLNwCpHLgWfEBxO9jEUf9/7HHHAaYB UOJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=MRG1yteP; 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 n11-v6si11683375pgs.404.2018.05.24.19.45.31; Thu, 24 May 2018 19:45: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=MRG1yteP; 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 S1034697AbeEXWGW (ORCPT + 99 others); Thu, 24 May 2018 18:06:22 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33927 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034671AbeEXWGS (ORCPT ); Thu, 24 May 2018 18:06:18 -0400 Received: by mail-wm0-f65.google.com with SMTP id q4-v6so10283294wmq.1 for ; Thu, 24 May 2018 15:06:17 -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=LP7V/R7RqeQsZXbUv704jUnjq+rVIJsN9Wsaoeo/5Yc=; b=MRG1ytePImPetHWt0Q9q/Gwly5t1Kw9ED8owsWA71dm6ZnGLLtgR+q4VwIStpamIeI Ta4XLvrnZlvGLPT0FfjJCGTgVeLMHuk029Gf6GCaEPLvbU7LLJ0betdy0atd3yJPbG60 OxWQhtswC8YTSED3efnwt4DgxLalKsUNY8f+8= 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=LP7V/R7RqeQsZXbUv704jUnjq+rVIJsN9Wsaoeo/5Yc=; b=YxCAsYsKFGmMl9q7dBqB9yeLT6bn9hVEqN7+8i8NTGInbMhcA9AVmWIWuYmPqbexZR inv1eCzPgsiNMcijV5CoWnNAmCv7Tz+EYa5qzCbDhf+4RVmMCp1b1iWrscj7DXMdn1l+ ks/wkZvGTWZ1qs/yI2cwtA05im4kr9AP2rOz9q/gJj3DU/OpBPkeJGVPYGUYLk4UX6jm A6rvELsOh/Ei/hsOwhtxN27ZeSrqoYEnz47DJ9KJh1WLMIfQXa+XQbCBrRWG378Stbcq 1FYGIyAGoHy8JyFoKti1MGAxe4hVVfCJfsCm8Bs14Qr5G4RVJp4OWoMsuhlOeILToYCc uTWw== X-Gm-Message-State: ALKqPwf2T8jiklFsPbwmTgu19tGCXR3gkHoIJ+jRD+jEMbKJ5zud8MR9 3o7igXWJvM/cmoPEkQ9Bcyjq5w== X-Received: by 2002:a1c:ec4b:: with SMTP id k72-v6mr9763984wmh.27.1527199577139; Thu, 24 May 2018 15:06:17 -0700 (PDT) Received: from andrea ([94.230.152.15]) by smtp.gmail.com with ESMTPSA id z8-v6sm28018069wrl.62.2018.05.24.15.06.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 15:06:16 -0700 (PDT) Date: Fri, 25 May 2018 00:06:10 +0200 From: Andrea Parri To: Mark Rutland Cc: Will Deacon , Peter Zijlstra , linux-kernel@vger.kernel.org, mingo@kernel.org, linux-arm-kernel@lists.infradead.org, yamada.masahiro@socionext.com Subject: Re: [PATCH 6/9] asm-generic/bitops/atomic.h: Rewrite using atomic_fetch_* Message-ID: <20180524220610.GA7607@andrea> References: <1527159586-8578-1-git-send-email-will.deacon@arm.com> <1527159586-8578-7-git-send-email-will.deacon@arm.com> <20180524124410.GF12198@hirez.programming.kicks-ass.net> <20180524124734.GE8689@arm.com> <20180524130948.f37eltocl5tnittp@lakrids.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180524130948.f37eltocl5tnittp@lakrids.cambridge.arm.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 Hi Mark, > As an aside, If I complete the autogeneration stuff, it'll be possible > to generate those. I split out the necessary barriers in [1], but I > still have a lot of other preparatory cleanup to do. I do grasp the rationale behind that naming: __atomic_mb_{before,after}_{acquire,release,fence}() and yet I remain puzzled by it: For example, can you imagine (using): __atomic_mb_before_acquire() ? (as your __atomic_mb_after_acquire() is whispering me "acquire-fences"...) Another example: the "atomic" in that "smp_mb__{before,after}_atomic" is so "suggestive"! (think at x86...), but it's not explicit in the proposed names. I don't have other names to suggest at the moment... ;/ (aka just saying) Andrea > > IIUC, the void-returning atomic ops are relaxed, so trying to unify that > with the usual rule that no suffix means fence will slow things down > unless we want to do a treewide substitition to fixup for that. > > Thanks, > Mark. > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git/commit/?h=atomics/api-unification&id=c6b9ff2627d06776e427a7f1a7f83caeff3db536