Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp368435pxa; Fri, 14 Aug 2020 06:37:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGF2ugZFCMNFfFPFQDxGnNeDAFktulA7magi2eZsuS2sk6rn3lbuG9X2c7E3pptybF+M0s X-Received: by 2002:a17:906:86c9:: with SMTP id j9mr2397381ejy.5.1597412249180; Fri, 14 Aug 2020 06:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597412249; cv=none; d=google.com; s=arc-20160816; b=vLFROEa7Wl3irikvRf2ihuZBcFzDHG1s7/vGLBWyPk89hN7xBAdAfLJ8EGAy7qt84P wpBvd0HL3ehZydmbLD/QAeFQEubhxnFEdf/vd56xurXM7wkDLvvoDw8bRFHA+QkpBmEZ 93XtBry+eGrCRKtIB4zlwBE7En2wEb/WTKkbJMWCQJSODS3LiA3yetf5eceW5sOaJYnd tTzlR8y8HOflFydUjvF1zI7dHDn2MhVHaYndZ6sJmGn2JajmO/LkPGh0JMKPAWl3TQ1Z dklAXob93GSp6Jnf2WWSbEybknIS8BR3qPsptIrbRlbVyhUz+6R5XUv+cB4gQBWguvSB JvCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Ukhz8djqX1OiGAc3hdvf/8g0VwarRLmUdLD4Jq1qXII=; b=wEjcnYDdjS90YYWJ4Q7+A6gf1Sr/MMiwO5Jtmcy1k+3dZoVQssPVYtzO4wW70yvaz2 Ap2j412R4syyktPvvgrXkPIjNUkfgutgsAs/BcsZT5+FfShPa6yIVQ5aon/g94Slm/+l d77nTuwFZSFifVFkrgLOASvLZ/lg0GFAOWKrDbZZx8wYqtXZ9JdQxoicppnxmINKjM6Q u7rFrEDURquiabT9ZLSccK85z9yZ9IotmmZd+HhkwrHvnDC3iFAQy+hF3/+6tov7wuJc /PfM0xDErrjKj3xJFIOiNTXYRO7CwhVNTEMwRwmlj6kADipC9mH9m7P+KhKWdgwUJ7CB sIWA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b12si5595534ejl.139.2020.08.14.06.37.06; Fri, 14 Aug 2020 06:37:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728257AbgHNMeM (ORCPT + 99 others); Fri, 14 Aug 2020 08:34:12 -0400 Received: from foss.arm.com ([217.140.110.172]:33878 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbgHNMeL (ORCPT ); Fri, 14 Aug 2020 08:34:11 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9C6EB31B; Fri, 14 Aug 2020 05:34:10 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.33.165]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 40F0E3F6CF; Fri, 14 Aug 2020 05:34:08 -0700 (PDT) Date: Fri, 14 Aug 2020 13:34:05 +0100 From: Mark Rutland To: Marco Elver Cc: Peter Zijlstra , "Paul E. McKenney" , Will Deacon , Arnd Bergmann , Dmitry Vyukov , Alexander Potapenko , kasan-dev , LKML , linux-arch Subject: Re: [PATCH 8/8] locking/atomics: Use read-write instrumentation for atomic RMWs Message-ID: <20200814123405.GD68877@C02TD0UTHF1T.local> References: <20200721103016.3287832-1-elver@google.com> <20200721103016.3287832-9-elver@google.com> <20200721141859.GC10769@hirez.programming.kicks-ass.net> <20200814112826.GB68877@C02TD0UTHF1T.local> <20200814113149.GC68877@C02TD0UTHF1T.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 14, 2020 at 01:59:08PM +0200, Marco Elver wrote: > On Fri, 14 Aug 2020 at 13:31, Mark Rutland wrote: > > On Fri, Aug 14, 2020 at 12:28:26PM +0100, Mark Rutland wrote: > > > Hi, > > > > > > Sorry to come to this rather late -- this comment equally applies to v2 > > > so I'm replying here to have context. > > > > ... and now I see that was already applied, so please ignore this! > > Thank you for the comment anyway. If this is something urgent, we > could send a separate patch to change. I'm not particularly concerned; it would've been nice for legibility but I don't think it's very important. I'm happy with leaving it as-is or with a cleanup at some point -- I'll defer to Peter to decide either way. > My argument in favour of keeping it as-is was that the alternative > would throw away the "type" and we no longer recognize a difference > between arguments (in fairness, currently not important though). If, > say, we get an RMW that has a constant argument though, the current > version would do the "right thing" as far as I can tell. Maybe I'm > overly conservative here, but it saves us worrying about some future > use-case breaking this more than before. I'd argue that clarity is preferable, since we'd have to change this to deal with other variations in future (e.g. mixes of RW and W). I have difficulty imagining an atomic op that'd work on multiple atomic variables with different access types, so I suspect it's unlikely to happen. As above, not a big deal regardless. Thanks, Mark.