Received: by 10.192.165.148 with SMTP id m20csp994329imm; Sat, 5 May 2018 02:33:10 -0700 (PDT) X-Google-Smtp-Source: AB8JxZohd2vwd5xUOvyRCYoQDrz57oLZchCq2c4yW5OkwaaTy14zzs5JaineWreEsZf30DfkRPCi X-Received: by 2002:a17:902:788e:: with SMTP id q14-v6mr30364088pll.98.1525512790430; Sat, 05 May 2018 02:33:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525512790; cv=none; d=google.com; s=arc-20160816; b=BPsY6NywK7Q0E8yN48jzNshkdHt6lLbK3BhCCg2+ffEPm2z3JkCq1WGdyQJsmZqddN /tS2psGv69i6eoZCygKfLp5LqhBTLobm82ElSUXgix4h0KdVi85W6VY8EAgLKcGS52YR grHPJZ6IcuCGDS/4W2B1XajEMY+pb4Vr7GJj+f3kxj9r28F0w4c5qSOU1vkg7kLgaAAX bV7RvTRxPZ2MI1poh4nP35m7M3K10WC11rqPX4QlGC/ztrToQb+/JnjoYz6lWG1jcPrO jjUFwkbgclHK3/0ap2UNlmkJYbtv7ldgY2u2vXnFcDoh5ce0ymUlheXTKmFU0toIjlBD 9Z6Q== 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=ZsR9/7VjdhtjzEKDd/mEdg7Fs5dEOTHh+hNXUYLoeA0=; b=kuJ8NqelJj7J9+BeGDv+/qnZSqcCAL4XSsOI4QdxJh+i1UG0cWknbbEafrsUme2jd9 s2QI5EJN72w7VXIoywVcqHIyoKhHwPTHkftDURrWT0Ke9JCMBlcn9A7aUul8ecUtAWu/ lusNb9naFLizY1nG6/OUp34fbnUbbTUXM8i8RyBHqwppISKoKrEDqX1KOIi7IcPfKhF3 aBqhAmOGCJeM6pZujaZeEBrwu1aSewdG5wjFy9+3+94aOBdEo75rMfRCybARyKVV9GwT s8k9UyBDr2STV51BX7/qPcrZK3ENWx+epcLwkGGgC1+oemFAyWj8gPbvf41mNK2Vq1JV jx3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=J5r6lIpR; 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 a204si15641169pfa.148.2018.05.05.02.32.55; Sat, 05 May 2018 02:33:10 -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=bombadil.20170209 header.b=J5r6lIpR; 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 S1751573AbeEEJcm (ORCPT + 99 others); Sat, 5 May 2018 05:32:42 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:45044 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbeEEJcl (ORCPT ); Sat, 5 May 2018 05:32:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=ZsR9/7VjdhtjzEKDd/mEdg7Fs5dEOTHh+hNXUYLoeA0=; b=J5r6lIpRDyxwWYXbQ1IVIh2oQ munxkFOYZSdbxMiqkmNsHSEVISEzD3gQQL4u7jcqKhpx4/ZbJYttTVClgUaLDpF3mDfs1SffGcVch Y7TlcZlUtokNdZKLWUcAM4l9XFJBgB8D7fTAUEO9OumZiJxP0KkwPzMbXyFVL6C3ifm1wCnuR5HtS 29OAdwqk2rtYdk5XIVaDy3r1GOgqSkyDQP85dQBgcNy5U7KbPfr8wsfKmltumE66Y9Whw6IbHgbNj 99Owzt4fC5aVTaBXYOI8bYgAuxkV2cLMGymYjj08uwz1MFO68Cv/Fa23nOkp4kcLFUkV0iBrYuF5F 2JxGE9EsQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fEtYU-0001GN-NC; Sat, 05 May 2018 09:32:38 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 2D1B22029FA13; Sat, 5 May 2018 11:32:37 +0200 (CEST) Date: Sat, 5 May 2018 11:32:37 +0200 From: Peter Zijlstra To: Dmitry Vyukov Cc: Ingo Molnar , Mark Rutland , Linux ARM , LKML , Andrey Ryabinin , Boqun Feng , Catalin Marinas , Will Deacon Subject: Re: [PATCH] locking/atomics: Clean up the atomic.h maze of #defines Message-ID: <20180505093237.GD12217@hirez.programming.kicks-ass.net> References: <20180504173937.25300-1-mark.rutland@arm.com> <20180504173937.25300-2-mark.rutland@arm.com> <20180504180105.GS12217@hirez.programming.kicks-ass.net> <20180504180909.dnhfflibjwywnm4l@lakrids.cambridge.arm.com> <20180505081100.nsyrqrpzq2vd27bk@gmail.com> <20180505084721.GA32344@noisy.programming.kicks-ass.net> 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 Sat, May 05, 2018 at 11:05:51AM +0200, Dmitry Vyukov wrote: > On Sat, May 5, 2018 at 10:47 AM, Peter Zijlstra wrote: > > And I seriously hate this one: > > > > ba1c9f83f633 ("locking/atomic/x86: Un-macro-ify atomic ops implementation") > > > > and will likely undo that the moment I need to change anything there. > That was asked by Ingo: > https://groups.google.com/d/msg/kasan-dev/3sNHjjb4GCI/Xz1uVWaaAAAJ > > I think in the end all of current options suck in one way or another, > so we are just going in circles. Yeah, and I disagree with him, but didn't have the energy to fight at that time (and still don't really, I'm just complaining). > We either need something different (e.g. codegen), or settle on one > option for doing it. Codegen I think is the only sensible option at this point for all the wrappers. The existing ones (without the annotation muck) were already cumbersome, the annotation stuff just makes it completely horrid.