Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5617570pxv; Wed, 28 Jul 2021 15:25:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqQOHhFzjh2CIYN1dmD3JzsYbwJRiPYQugRlOPnnrULzQqhWXoAITKpNqAyx/6dH1UC0Et X-Received: by 2002:a92:cd41:: with SMTP id v1mr381809ilq.212.1627511132605; Wed, 28 Jul 2021 15:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627511132; cv=none; d=google.com; s=arc-20160816; b=PKT4G7s0RGEzYo+QrAevAA6jsXYK1m5n1OIdpUy1SMyOhTFCavBHAX0ZfUdaQuh+SJ 7S+6j8i2GiospfYfu+V810m0Fn2O8ez4Depp7NQKq4UJbtK6uY8HpxNslGAjL3AYnE5s Xq05auKZLsuV5ezs/+qy9Ol/ep8iX3GfmiJIL1LmJCwi4j0IUSMuSI5lS62nG3o9ccLv H/KxMnVzLpQ4/EsqYuCwELHODfjmIHd3e+eNIlae4xF3OnEcSkK+80Cqt+fzMt4+GAuM xS+nKLU/Vw30LGSDzy36TaT891M/Vhu6USEIeE15Df98gdbW/pASWtfbcXeori5jRUQC 1AbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=P7RfJzW1RmiUUjxO+K/MF5DGo8qq67I3g2agobYTM9s=; b=OcVP81dQE60BG16UxZZsIWRmBbzOBZK5QFFdq2X+O1yUwIdUcp+hOFuo4oMmsbzaf/ q8DuPZusktJxNcXKY8Pin+ngco185bFMYHDyIHNAmo7QF7vvAyPNr14Yv65r0BIO/NKC fl7Wl/eBLaW7oN7qrcWhjg4kMH3DYhYSqUkuy/NZnINdiag3M1vmEmZp6UdAoUcLGal8 TVtq3QCSTrXMtqyegtm9WKg6x/zYkP2B5vfi/rngbaYO0YQmwIfjqRiHDTPWftd8wXHU MQgFugxLgeCkVamNgCVUMusvTDB8+NO8HDVYelKaQOANltvhWmvTHhB+8bBl29fpdzb5 bMUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ArOyjbf5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s1si1457234jat.54.2021.07.28.15.25.21; Wed, 28 Jul 2021 15:25:32 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ArOyjbf5; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232131AbhG1WXi (ORCPT + 99 others); Wed, 28 Jul 2021 18:23:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:54298 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232022AbhG1WXh (ORCPT ); Wed, 28 Jul 2021 18:23:37 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2482861019; Wed, 28 Jul 2021 22:23:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627511015; bh=7leYzEKTO72ulBPDz/mgh+DcPVqVRolcwyFWqDqo9IU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ArOyjbf5QGrNOWYvt/INH53Y9I4ux9FxbaP6tx589HA/38DQLCDVV946md4fAlv2O JhZWuphwPUJt6ZblFwXVs9Pv6jvsky0TnK9EPqad3hGo8vI0jwjnL3/uFjbYFE/T9p saVO98tXbh9rOHbu7QRVZPscxR6beRqdSC9EUBj65RkqkFabD3xySla35OWbs2Da9U E/rmNdtyE2ZMqVxQEiHti0iRImWs+LoOdW06NjIS1WFAlX5HqefRyjQUPYPyXmYjad dNPtnTEMFN8+l6mPye3AgMErOW17V2Z7scL3Ri2e6YJtsMD3KiktWi4JMEuu4r6IHQ KOfjiIHcnDRbQ== Date: Thu, 29 Jul 2021 00:23:33 +0200 From: Frederic Weisbecker To: "Paul E. McKenney" Cc: Josh Triplett , rcu@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, Linus Torvalds Subject: Re: [PATCH v2 rcu 04/18] rcu: Weaken ->dynticks accesses and updates Message-ID: <20210728222333.GE293265@lothringen> References: <20210721202042.GA1472052@paulmck-ThinkPad-P17-Gen-1> <20210721202127.2129660-4-paulmck@kernel.org> <20210728173715.GA9416@paulmck-ThinkPad-P17-Gen-1> <20210728204720.GN4397@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210728204720.GN4397@paulmck-ThinkPad-P17-Gen-1> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 28, 2021 at 01:47:20PM -0700, Paul E. McKenney wrote: > On Wed, Jul 28, 2021 at 01:37:19PM -0700, Josh Triplett wrote: > > On Wed, Jul 28, 2021 at 10:37:15AM -0700, Paul E. McKenney wrote: > > > This change makes the memory ordering requirements > > > more evident, and it might well also speed up the to-idle and from-idle > > > fastpaths on some architectures. > > > > Cleaning up the memory ordering requirements certainly seems worthwhile. > > But is there any straightforward benchmark that might quantify the > > "might well also speed up" here? How much does weakening the memory > > ordering buy us, in practice? > > None that I know of! I know two: 1) The whole debate makes us review again (and again) the memory ordering requirements in RCU VS dynticks-idle, which can only be good to enforce correctness. 2) The more we weaken the ordering, the better we grasp and understand the underlying ordering requirements. Unnecessary full memory barriers tend to obfuscate our ordering expectations, making the code less self-explanatory. 3) I have terrible ideas to remove a full barrier in the dynticks idle path that should work in practice but not in theory and therefore I'm never going to talk about it unless everyone in the room is drunk.