From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-20.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24D00C11F65 for ; Wed, 30 Jun 2021 13:48:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1024461628 for ; Wed, 30 Jun 2021 13:48:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235874AbhF3Nuk (ORCPT ); Wed, 30 Jun 2021 09:50:40 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:32938 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235133AbhF3NuB (ORCPT ); Wed, 30 Jun 2021 09:50:01 -0400 Date: Wed, 30 Jun 2021 13:47:30 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1625060851; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEzR7VBaZbU9KAtf0OZ0/r0qcFg4pdX0SEKjyLSIU3Q=; b=rWjm6XExaTPhS3KYH1wMOH5L9D9jbBaoTYx2qv/htMNO+1skY4Gh/RA1qsaopjMAfBJyVW M4wH250u4XjzWMd/EfuoicYzhYf7a9vSSrHD5qF10DuxtM5jrpd+oo5BOAnU1IQ+JVsxDi fxVKa4w/L3FQcBZXT3GtnTxLpTZqxIdak9NiPgdtjr28G+tIFiEWlCrhig96f76GF2V4oJ o7SOPPbtz4+N7pzm21t4xav8zhQmvWdyQw9w/yuzorUrZOULd7QhimZCyeiTJE5PYDIYDF gBOBCazc81H5aUVzVTMaT7m6W7cu3iz5GnyIu6xev3CTNVupw8Laiy+ruKMfLA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1625060851; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fEzR7VBaZbU9KAtf0OZ0/r0qcFg4pdX0SEKjyLSIU3Q=; b=3pkJt7keEe4PW5bQCiJ7bh1XbgeEjz8BPFBeEXMVVkPpNX8kaEc7m2VldkZIv9LOePHc51 jt4+85fZLHB0FeBA== From: "tip-bot2 for Frederic Weisbecker" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/rcu] rcu/nocb: Directly call __wake_nocb_gp() from bypass timer Cc: Frederic Weisbecker , Josh Triplett , Lai Jiangshan , Joel Fernandes , Neeraj Upadhyay , Boqun Feng , "Paul E. McKenney" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <162506085052.395.5718251285639705149.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the core/rcu branch of tip: Commit-ID: c7ef7500a891432a3bb2b036f535bfdf58aa3605 Gitweb: https://git.kernel.org/tip/c7ef7500a891432a3bb2b036f535bfdf58aa3605 Author: Frederic Weisbecker AuthorDate: Tue, 23 Feb 2021 01:10:05 +01:00 Committer: Paul E. McKenney CommitterDate: Wed, 12 May 2021 12:10:08 -07:00 rcu/nocb: Directly call __wake_nocb_gp() from bypass timer The bypass timer calls __call_rcu_nocb_wake() instead of directly calling __wake_nocb_gp(). The only difference here is that rdp->qlen_last_fqs_check gets overridden. But resetting the deferred force quiescent state base shouldn't be relevant for that timer. In fact the bypass queue in question can be for any rdp from the group and not necessarily the rdp leader on which the bypass timer is attached. This commit therefore calls __wake_nocb_gp() directly. This way we don't even need to lock the ->nocb_lock. Signed-off-by: Frederic Weisbecker Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Paul E. McKenney --- kernel/rcu/tree_plugin.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 5a2aa9c..82e9ffb 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -2015,9 +2015,10 @@ static void do_nocb_bypass_wakeup_timer(struct timer_list *t) struct rcu_data *rdp = from_timer(rdp, t, nocb_bypass_timer); trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("Timer")); - rcu_nocb_lock_irqsave(rdp, flags); + + raw_spin_lock_irqsave(&rdp->nocb_gp_lock, flags); smp_mb__after_spinlock(); /* Timer expire before wakeup. */ - __call_rcu_nocb_wake(rdp, true, flags); + __wake_nocb_gp(rdp, rdp, false, flags); } /*