Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp180865ybp; Thu, 3 Oct 2019 11:58:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqxM2+GEP3/TiFOxyB+gQ2jsJ2reQPt3xndmpXTANotXe3Iuk8BYgS3sp1X9qwA8xXrEq6t8 X-Received: by 2002:a50:ce06:: with SMTP id y6mr10823306edi.282.1570129090318; Thu, 03 Oct 2019 11:58:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570129090; cv=none; d=google.com; s=arc-20160816; b=KqWFR7NFvk8A0ONHKZkvCuwtHgX4yyPVMlTPtDLTsffdnuM4bjYkNIZuzME6i8gas8 PRkiE6i1Er8e5vM4maWXU739uB0yoGohAko5dTWChxAuL6VT7EnWwxrYgD+4tC8P8J+p HOWRLNkmkxD9vaAY05sTn2A8jCPOmUwIYYyl6w+/oz7gcdnEsvgkBZdtzd8q66S015ro NdhYa5H9GrlCrKgFk4BygG59U1HJElZbY8+yeAagDrXPwOI6Rf+lXVwWAuglhQvHcCPD 6LoKAPbmBxnMqCrHWaytTOCMbBihXHn9HwZiENUYzFTrKWE9C/l/hlSHUk+0xAzuVfDx MrmQ== 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; bh=WyPRuVAU5nKXtdZnfXrEV/Yh6ZzXoc85gldhc3aCFNI=; b=RFOsgK4h7FJkG9ruK4JIWHknYqnD7IAAsQumu3SooXk0SAXizgeRScPTSkSIUljDz3 JholF6jR+OGNvcSqIol2Te7M+BLZqOHgSEkdd7EKKyZXYNDSWMwMTw56f9H2nqryuukM a7ZaR2y7C82NI9S7kiI9IpDlEy7B35z0yEV3OZHLoXFUf6B6u5gPLuw2yBp8d7ZOE6Hg n/GYIgSx5z1T46xlIs73vJ3P9/KsdC/105eL6RA98s7HEXYs/Dm87s/lJYCdPJoN9NJW wzqZ5kb8VtsefosjFiXc61kagXxdsIthkQO7U9tJdvofI3UBWPCr0pzDu3iqKpnJNR7Q Lyuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=P33VuDoP; 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 w20si2163176edc.202.2019.10.03.11.57.46; Thu, 03 Oct 2019 11:58: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=merlin.20170209 header.b=P33VuDoP; 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 S1733140AbfJCSGP (ORCPT + 99 others); Thu, 3 Oct 2019 14:06:15 -0400 Received: from merlin.infradead.org ([205.233.59.134]:56726 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730357AbfJCSGP (ORCPT ); Thu, 3 Oct 2019 14:06:15 -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=WyPRuVAU5nKXtdZnfXrEV/Yh6ZzXoc85gldhc3aCFNI=; b=P33VuDoPb42L4/QiPVmsXeS/G +3bGheY/Sn22ZPzTNTT3Nkp8pZ4m8ruzt95pRoiZzZHenNRuwel5FM0O/RTLQ0OHX4t5EzwoK/QhL Iw4Odkd1AzUeOy7cmzLdcglIUeBs/dBXTxTpgWZ5pAhlK4hDlYlWLW8+cALuhvXDtb58pDZFuPHS3 1U7xo0lVDUuJIEEq2eKsX72xgwxsuooZGd/q5fGnnP212jIEuvtARm86PtCHdTWSBmMc3Ic+Xet1W kJsr5zpeRnPCBPJOSp0ShE7iG1hQhV+J5/gFGqj5fGnTztCx3Iqn+iAByDHGtz720edoJPsrSY/cf hNRkXv53A==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=worktop.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.2 #3 (Red Hat Linux)) id 1iG5Tn-0003ae-Ke; Thu, 03 Oct 2019 18:05:31 +0000 Received: by worktop.programming.kicks-ass.net (Postfix, from userid 1000) id 674389802BF; Thu, 3 Oct 2019 20:05:28 +0200 (CEST) Date: Thu, 3 Oct 2019 20:05:28 +0200 From: Peter Zijlstra To: Mathieu Desnoyers Cc: rostedt , David Howells , paulmck@kernel.org, rcu , linux-kernel , Ingo Molnar , Lai Jiangshan , dipankar , Andrew Morton , Josh Triplett , Thomas Gleixner , Eric Dumazet , fweisbec , Oleg Nesterov , "Joel Fernandes, Google" , Bart Van Assche , Christoph Hellwig , Hannes Reinecke , Johannes Thumshirn , Shane M Seymour , "Martin K . Petersen" Subject: Re: [PATCH tip/core/rcu 1/9] rcu: Upgrade rcu_swap_protected() to rcu_replace() Message-ID: <20191003180528.GH4643@worktop.programming.kicks-ass.net> References: <20191003014310.13262-1-paulmck@kernel.org> <20191003014153.GA13156@paulmck-ThinkPad-P72> <25408.1570091957@warthog.procyon.org.uk> <20191003090850.1e2561b3@gandalf.local.home> <561448323.948.1570120298211.JavaMail.zimbra@efficios.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <561448323.948.1570120298211.JavaMail.zimbra@efficios.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 03, 2019 at 12:31:38PM -0400, Mathieu Desnoyers wrote: > We might want to consider simply using xchg() here. As stated elsewhere, xchg() is an atomic op with full ordering, IOW it is stupid expensive for what needs to be done.