Received: by 10.192.165.148 with SMTP id m20csp5193696imm; Wed, 9 May 2018 00:34:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqMI5cTQM433yhbH6xNmhvoluAdWdI5VPK8OQh1iLberDtVrTwHIcB5oSqB0iHmcs/63Nxc X-Received: by 2002:a63:7f49:: with SMTP id p9-v6mr3980069pgn.401.1525851248572; Wed, 09 May 2018 00:34:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525851248; cv=none; d=google.com; s=arc-20160816; b=SyKoqZIg7eF2Pd/75W7wCGbF4+C599sMhJE8+/+oLBAgrU9tg/CaUbOkYsCWnUU9Ua BZZDJzDHDYbsArGu0roSpbH7MPlOK9k8jy02rf7x0X9ASE8fsvxNwK9qiedtxDRUcD4Y yHsxjrW9gvD+Mlhn4XVmnqxGjcv8GsxhDPeDnC/m0mpBkc5PUfEhzhNxc0vuZu0Nq3hj 0RQPs+17knQF3jA8fMQ2OiEuETa1a/J/uYDsJPY5DGCcP0s/rn8EbdeWRuuYNVa1Kqfg TVWhiPPbVCqahwMENIOf0eyaMfDG9cRp1byP+5ogE7KhOJeXbFY+gNwpTaEWxh/URgIt DvBQ== 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=9JqfHeZO9L3M6u57jo768znVIOatUjM8rWnyTYdG6xw=; b=EV6wEufliuIGFN2Pm5mwGOOURsxoRv7wl/RZspc++TbJSqhRzY9HOxe8lGRSJCKlPO h3k2PTV8fSLRN/+dXwMWUsYN1w9ZxqAI6jh2MakKAp5HfhvmmfRin6NZIvpHRxFW83hB HVQfJN9iauvFEDeKLz5DPZWUWEBAr12vJVtkNon3swugqTlediNHzW01eJHWZHZAiG8B lyQwY3nihwAq/st5kBCZMle4fFTWolZjf+SynQVg5IRTVsdRl1FdcINgpJfhqZmJXNQP BU3ZsEyDSOoDV0MHYPc+mQjrTRcKdsYeEy6gEMJy2HYta+8aolwjArG5UeIi3q8FKjtF UuHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=XsZOxGsS; 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 i67si25857476pfi.95.2018.05.09.00.33.54; Wed, 09 May 2018 00:34:08 -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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=XsZOxGsS; 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 S1756206AbeEIHdl (ORCPT + 99 others); Wed, 9 May 2018 03:33:41 -0400 Received: from merlin.infradead.org ([205.233.59.134]:49580 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753242AbeEIHdj (ORCPT ); Wed, 9 May 2018 03:33:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9JqfHeZO9L3M6u57jo768znVIOatUjM8rWnyTYdG6xw=; b=XsZOxGsSsbKrU7U7sm/jOSFig kZlCZe6hE0MCuMiqn03MZnym16JB2baeIhnLKjMOcqQZ9w0pf2RET8aqaMyY2RzWwa7mnpmQkAWZH l0FGG30B3Of8kFjC95O+62zalyjdjC6T7Wpnv59q9J1KVcKcLGM1CTflhlxdrFVnYR+VF+J2/gLqh LN445KJ8X3Z6GXnjsxxi1lre3qe4dZo+QGFZHfm136NnKBu2S0JW3pXFsh2NsMPJAWB20NQNiq6l0 2xTBAuxDrMgMb7bvnwuP/UfU3NQg+F44Uyoo0fWq6g8LgkxTEpwX0OAe8xjSeW67kduI0SPpqeY1F zk4x1tRDg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fGJbO-0006Jp-Rl; Wed, 09 May 2018 07:33:31 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 1E90B2029FA13; Wed, 9 May 2018 09:33:27 +0200 (CEST) Date: Wed, 9 May 2018 09:33:27 +0200 From: Peter Zijlstra To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org, will.deacon@arm.com, mark.rutland@arm.com, torvalds@linux-foundation.org, paulmck@linux.vnet.ibm.com, mingo@kernel.org, tglx@linutronix.de, hpa@zytor.com Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:locking/core] locking/atomics: Simplify the op definitions in atomic.h some more Message-ID: <20180509073327.GE12217@hirez.programming.kicks-ass.net> References: <20180505083635.622xmcvb42dw5xxh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.5 (2018-04-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, May 06, 2018 at 05:14:36AM -0700, tip-bot for Ingo Molnar wrote: > Commit-ID: 87d655a48dfe74293f72dc001ed042142cf00d44 > Gitweb: https://git.kernel.org/tip/87d655a48dfe74293f72dc001ed042142cf00d44 > Author: Ingo Molnar > AuthorDate: Sat, 5 May 2018 10:36:35 +0200 > Committer: Ingo Molnar > CommitDate: Sat, 5 May 2018 15:22:44 +0200 > > locking/atomics: Simplify the op definitions in atomic.h some more > > Before: > > #ifndef atomic_fetch_dec_relaxed > # ifndef atomic_fetch_dec > # define atomic_fetch_dec(v) atomic_fetch_sub(1, (v)) > # define atomic_fetch_dec_relaxed(v) atomic_fetch_sub_relaxed(1, (v)) > # define atomic_fetch_dec_acquire(v) atomic_fetch_sub_acquire(1, (v)) > # define atomic_fetch_dec_release(v) atomic_fetch_sub_release(1, (v)) > # else > # define atomic_fetch_dec_relaxed atomic_fetch_dec > # define atomic_fetch_dec_acquire atomic_fetch_dec > # define atomic_fetch_dec_release atomic_fetch_dec > # endif > #else > # ifndef atomic_fetch_dec_acquire > # define atomic_fetch_dec_acquire(...) __atomic_op_acquire(atomic_fetch_dec, __VA_ARGS__) > # endif > # ifndef atomic_fetch_dec_release > # define atomic_fetch_dec_release(...) __atomic_op_release(atomic_fetch_dec, __VA_ARGS__) > # endif > # ifndef atomic_fetch_dec > # define atomic_fetch_dec(...) __atomic_op_fence(atomic_fetch_dec, __VA_ARGS__) > # endif > #endif > > After: > > #ifndef atomic_fetch_dec_relaxed > # ifndef atomic_fetch_dec > # define atomic_fetch_dec(v) atomic_fetch_sub(1, (v)) > # define atomic_fetch_dec_relaxed(v) atomic_fetch_sub_relaxed(1, (v)) > # define atomic_fetch_dec_acquire(v) atomic_fetch_sub_acquire(1, (v)) > # define atomic_fetch_dec_release(v) atomic_fetch_sub_release(1, (v)) > # else > # define atomic_fetch_dec_relaxed atomic_fetch_dec > # define atomic_fetch_dec_acquire atomic_fetch_dec > # define atomic_fetch_dec_release atomic_fetch_dec > # endif > #else > # ifndef atomic_fetch_dec > # define atomic_fetch_dec(...) __atomic_op_fence(atomic_fetch_dec, __VA_ARGS__) > # define atomic_fetch_dec_acquire(...) __atomic_op_acquire(atomic_fetch_dec, __VA_ARGS__) > # define atomic_fetch_dec_release(...) __atomic_op_release(atomic_fetch_dec, __VA_ARGS__) > # endif > #endif > > The idea is that because we already group these APIs by certain defines > such as atomic_fetch_dec_relaxed and atomic_fetch_dec in the primary > branches - we can do the same in the secondary branch as well. > ARGH, why did you merge this? It's pointless wankery, and doesn't solve anything wrt. the annotated atomic crap. And if we're going to do codegen, we might as well all generate this anyway, so all this mucking about is a complete waste of time.