Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1209038pxb; Thu, 4 Mar 2021 06:12:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJx7Neq+69wef7VwF3cSx4+xg7wdrHpk5CWwqdmdfyxRynXuu4ozNkvW+6RbaC8HMdyw7LVr X-Received: by 2002:a17:906:7c57:: with SMTP id g23mr4294362ejp.195.1614867165434; Thu, 04 Mar 2021 06:12:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614867165; cv=none; d=google.com; s=arc-20160816; b=cEbBg2P0trsN6Z9xyQeQjht3fJJa7QhE3ZJd8eR8u/70uTjM+A4EfD0fRK7rgQBwiy z8gEa9Sp5MnRX0w7SAc2TSjsDLinin74vqV4VFcuUs9uJJKNisNWR3gfqHlUpBUGefPx VnBAJZTgV77zMjfFeZ86rcCcK1QZk/BaZdaj09WLKRjKvb0v1RxCAWBnnpQxUq2MQjtO Ma8OmHXfIDAZt5RnrxDnC0ZfIIaV3Bcyqnwg1uTjCiJ7qYsYo70iMBCO+6izIAcj3FG8 spp7hMGQBBPTjBrd3BRpPjZWNF5EgaZfJRkDfIyqkCtl3tZG7/tsoi1U9U8jZgjRpV68 /R7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=tfJHqkYRP4IC0ypYm4AYajZpY0AkcXNXjo3YikV1Np4=; b=fevJSQIS1Wbc2ki9n63vfIOE470QCxHmGPadZu9bTbdxEwWis9KzW4GMJmB97CPiT9 UhhVPE2k5wU95thSSUrqSVJlPpgZdH5R45eIv4d/tG7ZGGZtyK3k+r3YgJPpu5pXduaj MdDzZMGyvggiX4/Sk6/N+9QGTYsBfEcPlXdW0gbhK/1q9NAE+haMPiwXlUO6F1enoAtL 3SISsCVlXQGVuQv+4Q/d6ojOTCZ2j5utb+Lo08XwEgEo0s7crO6NK4VFR3IB5we0iBwe p/qh4V4FSM579KQshqiF9wcPaC5hX2LGXuHMLDsjWx0P1T6RGzbd1HW/NcIl9bGmdyIy 0r1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kdwkPSwC; 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 y21si15845031edq.105.2021.03.04.06.12.22; Thu, 04 Mar 2021 06:12:45 -0800 (PST) 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=kdwkPSwC; 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 S1353827AbhCDBD3 (ORCPT + 99 others); Wed, 3 Mar 2021 20:03:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:48826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1448485AbhCDAZz (ORCPT ); Wed, 3 Mar 2021 19:25:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 86AC164EE3; Thu, 4 Mar 2021 00:23:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1614817394; bh=ACmOLMPxBxJ21CKaJHWqFcZB8U+4BbhPAyA/yBe7XrM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kdwkPSwCFv99Jf1fclwG4SQTeeORV1GkyzEKQ/Cv/G6JCO4NlAQoJZOE7ClYnxniI ClQ9TBLhgrrR52ZQZgLuJ7lb4/r6goBPOHrS5n3ngARP1EU9GFPaBfh9M7yGchRNDN JFtCoRP8jwy+xiIHsOzLX4lsUa1XxOobTwaYY/9+K5qiios1VXJOmBU8cMWU6mwSAx 0tuQg8+2TOyOvvXjAf52O3aYEIdwLtbEY6e6wDipHiL7QfDdi/gfuOBMSJV8mSngcw 68wougs89eqqhwYD/A8fas/di/tCn3HIRJiVOO6gU9a1gX/B4leg7yd8IKv4XeDwhP XwRjcY4wYzRzA== From: paulmck@kernel.org To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, mingo@kernel.org, jiangshanlai@gmail.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, joel@joelfernandes.org, Frederic Weisbecker , Neeraj Upadhyay , Boqun Feng , "Paul E . McKenney" Subject: [PATCH tip/core/rcu 07/12] rcu/nocb: Rename nocb_gp_update_state to nocb_gp_update_state_deoffloading Date: Wed, 3 Mar 2021 16:23:06 -0800 Message-Id: <20210304002311.23655-7-paulmck@kernel.org> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20210304002225.GA23492@paulmck-ThinkPad-P72> References: <20210304002225.GA23492@paulmck-ThinkPad-P72> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Frederic Weisbecker The name nocb_gp_update_state() is unenlightening, so this commit changes it to nocb_gp_update_state_deoffloading(). This function now does what its name says, updates state and returns true if the CPU corresponding to the specified rcu_data structure is in the process of being de-offloaded. Reported-by: Paul E. McKenney Cc: Josh Triplett Cc: Lai Jiangshan Cc: Joel Fernandes Cc: Neeraj Upadhyay Cc: Boqun Feng Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney --- kernel/rcu/tree_plugin.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 6a7f77d..93d3938 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@ -2016,7 +2016,8 @@ static inline bool nocb_gp_enabled_cb(struct rcu_data *rdp) return rcu_segcblist_test_flags(&rdp->cblist, flags); } -static inline bool nocb_gp_update_state(struct rcu_data *rdp, bool *needwake_state) +static inline bool nocb_gp_update_state_deoffloading(struct rcu_data *rdp, + bool *needwake_state) { struct rcu_segcblist *cblist = &rdp->cblist; @@ -2026,7 +2027,7 @@ static inline bool nocb_gp_update_state(struct rcu_data *rdp, bool *needwake_sta if (rcu_segcblist_test_flags(cblist, SEGCBLIST_KTHREAD_CB)) *needwake_state = true; } - return true; + return false; } /* @@ -2037,7 +2038,7 @@ static inline bool nocb_gp_update_state(struct rcu_data *rdp, bool *needwake_sta rcu_segcblist_clear_flags(cblist, SEGCBLIST_KTHREAD_GP); if (!rcu_segcblist_test_flags(cblist, SEGCBLIST_KTHREAD_CB)) *needwake_state = true; - return false; + return true; } @@ -2075,7 +2076,7 @@ static void nocb_gp_wait(struct rcu_data *my_rdp) continue; trace_rcu_nocb_wake(rcu_state.name, rdp->cpu, TPS("Check")); rcu_nocb_lock_irqsave(rdp, flags); - if (!nocb_gp_update_state(rdp, &needwake_state)) { + if (nocb_gp_update_state_deoffloading(rdp, &needwake_state)) { rcu_nocb_unlock_irqrestore(rdp, flags); if (needwake_state) swake_up_one(&rdp->nocb_state_wq); -- 2.9.5