Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp3296494lqo; Wed, 15 May 2024 05:53:46 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUSJxYlVoLLawGF6TNh83LcpCDHVx9Poviu7/EPYxOjxmpeI47l9oExj0PkCKIY9+OVvNFiWXp7p7Y1x/4OC8XvoMfkC/Mb3HQ/Gv94jw== X-Google-Smtp-Source: AGHT+IG4XTbAmkQkeY2ORuJD2rHSi+b2PzT8lLJkP5P3a/iRcVIPMgCv3NDIKSE8Nzx4g60JK7ic X-Received: by 2002:a05:6a20:1053:b0:1af:d19b:a7f with SMTP id adf61e73a8af0-1afde09f3f1mr16744423637.9.1715777625846; Wed, 15 May 2024 05:53:45 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715777625; cv=pass; d=google.com; s=arc-20160816; b=ntXk1UA5KXb9jkYglhTnTVoDyOQWmRtK7xZOioZsNSLprQBN7IqeR1maG/Kkr0U0Wq skBdeUJ0X8lB66k92bEoniyXflcgFs1Ri17UCMQI2ukw0TxWA7rsHICf2nCUbcrmEl2z ze4RPtiV6FHnf4xA+WnIa07JPLXlTicMPzG0F5thdcwTDkkpoDZZSNFxrxQQHegXKSUM iDV6LQh559Elukk2ZNEXo5jxVCREt54l/YZ8k5+RrQHnpRbkHkNfo+CxZQnCUlal40EU vjwG/46YzcNAWSLTfCIc5xlCi52sSfp0qzWpie16XhNkeTAksGaiLRlx9YUSs9EX7zsv 4Veg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=8xavXHAmfCDvG5pG3zr7NLFgfcjWI31R+9vC7IID3rs=; fh=y7YWp49TGn1SKctwYHNRFImp1RqPEFQizTwe3vKGdPo=; b=bdfCOVwo1mpurWnFYpiZa5zVH0wh6WWYRQtKxiuf/58XAHn8uNbQM9NAQgDS5oeFrZ EkGvEe5B4/lIDALaBkgEXb5lBQg6H3imngniMUdr08ffc7r5uPP1UuckMwwjuX6lxcRs J3qop1KrovVYYcz6XbsWNgSJpGbEtPTOxn1tyY00sU29qQdqPYFuWemfwsjXN3amX+iX MrLDVF4Ei47tWfY82FdcYlo6IHZv0cmm1BmbUqdH+9hbWVtOYckZQ9MhxfnLz2hoNugG hj+iOZoQ99EYdzyCTukm5YWI3n4+xlhKw7LVYK9KXZRIcPzUzoiF+dVIpWmvkXoc7z/u uijg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MywxZ0+l; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-179854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2a972besi13580052b3a.137.2024.05.15.05.53.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 May 2024 05:53:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-179854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MywxZ0+l; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-179854-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-179854-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 89A52B21228 for ; Wed, 15 May 2024 12:53:44 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 34C8784D3F; Wed, 15 May 2024 12:53:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MywxZ0+l" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5AD6381736; Wed, 15 May 2024 12:53:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715777618; cv=none; b=kN4mc+3p+BcpavI4CIrm38tZ7V5rZrFwrhRFezw9BcLkHEPMc7nLMXSkyz4fCQ/b4IVdNCVciuZjY7ZaDjGiFjC3LvrgiLNd986Jy7//w0uxyIcQ2qzMudFIArnz1bV3RvmPDsQmvd+eQrV0lnYN3+mM8veCxGSfhow9kK6LFsU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715777618; c=relaxed/simple; bh=o2o8Nk3Mhul8sFHnLwOqUg9mPLkrOh+Fk9GAEIfikwY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=aJRGA5sDajWvJnggnPvAjTcrxPbb9Bk3gL2fbVGBXxMzC6kFPF1OQCU2k65FlQCUCGxhKHTyn0DLmCZyqK0PgN6e4ugk11YTPks1KcHQW4kfb39gba1TQ7jEPtZrfzHAEOYxDL+n588crTLxl3Pg64CK3+dByahettBACAwuR8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MywxZ0+l; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E424AC116B1; Wed, 15 May 2024 12:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1715777617; bh=o2o8Nk3Mhul8sFHnLwOqUg9mPLkrOh+Fk9GAEIfikwY=; h=From:To:Cc:Subject:Date:From; b=MywxZ0+lzR8pSkZXqU7n8np2PduEdofYB/JgM8TG4mASxZTQpM4To6TS2cTIDZdiO m4UNbhCJ7NCr2B+dlkpp1vm1asMNrV9U5mGyoYTqcQAZvRyC/b9zMZORJZRW1WzrcM KEQpNpJ++p07gPE2ZSm4hs0q3254ziz6eV7l/9E2nVVMviYFjUxhYIxRO5HRm6U8Im O42KerhKYtQfwZ4V7hdHP8L+WP9X1bmVUIWAGGAvkC5ARo8/V1rrz6DKvTpggAoG/D FwLJnadRIJqwk+5y5foWxWm0OirCe0OYewc6XOoeGkEb4I0rdKEjDli8tNPHx2WMlY mT8Kf1UnX9evw== From: Frederic Weisbecker To: LKML Cc: Frederic Weisbecker , Valentin Schneider , "Paul E . McKenney" , Boqun Feng , Joel Fernandes , Neeraj Upadhyay , Uladzislau Rezki , Zqiang , rcu Subject: [PATCH 0/6] rcu: Remove several redundant memory barriers Date: Wed, 15 May 2024 14:53:26 +0200 Message-ID: <20240515125332.9306-1-frederic@kernel.org> X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Reviewing Valentin's patchset made me stare at some memory barriers on the way. Here is some removal proposal. Some may be beneficial on runtime (fqs snapshot with potentially as many smp_mb() as the number of online CPUs for each GP). Some happen on more rare path. In any case they clarify code reviews so we don't stumble upon mysterious barriers. Thanks. Frederic Weisbecker (6): rcu: Remove full ordering on second EQS snapshot rcu: Remove superfluous full memory barrier upon first EQS snapshot rcu/exp: Remove superfluous full memory barrier upon first EQS snapshot rcu: Remove full memory barrier on boot time eqs sanity check rcu: Remove full memory barrier on RCU stall printout rcu/exp: Remove redundant full memory barrier at the end of GP .../Tree-RCU-Memory-Ordering.rst | 6 +++--- kernel/rcu/tree.c | 21 +++++++------------ kernel/rcu/tree_exp.h | 16 +++++++++++--- kernel/rcu/tree_stall.h | 4 ++-- 4 files changed, 26 insertions(+), 21 deletions(-) -- 2.44.0