[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220819204857.3066329-12-joel@joelfernandes.org>
Date: Fri, 19 Aug 2022 20:48:54 +0000
From: "Joel Fernandes (Google)" <joel@...lfernandes.org>
To: linux-kernel@...r.kernel.org
Cc: "Joel Fernandes (Google)" <joel@...lfernandes.org>,
paulmck@...nel.org,
Rushikesh S Kadam <rushikesh.s.kadam@...el.com>,
"Uladzislau Rezki (Sony)" <urezki@...il.com>,
Neeraj upadhyay <neeraj.iitr10@...il.com>,
Frederic Weisbecker <frederic@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
rcu <rcu@...r.kernel.org>, vineeth@...byteword.org
Subject: [PATCH v4 11/14] lib: Move call_rcu() to call_rcu_lazy()
Move radix-tree and xarray to call_rcu_lazy(). This is required to
prevent callbacks triggering RCU machinery too quickly and too often,
which adds more power to the system.
Signed-off-by: Joel Fernandes (Google) <joel@...lfernandes.org>
---
lib/radix-tree.c | 2 +-
lib/xarray.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/radix-tree.c b/lib/radix-tree.c
index b3afafe46fff..1526dc9e1d93 100644
--- a/lib/radix-tree.c
+++ b/lib/radix-tree.c
@@ -305,7 +305,7 @@ void radix_tree_node_rcu_free(struct rcu_head *head)
static inline void
radix_tree_node_free(struct radix_tree_node *node)
{
- call_rcu(&node->rcu_head, radix_tree_node_rcu_free);
+ call_rcu_lazy(&node->rcu_head, radix_tree_node_rcu_free);
}
/*
diff --git a/lib/xarray.c b/lib/xarray.c
index ea9ce1f0b386..230abc8045fe 100644
--- a/lib/xarray.c
+++ b/lib/xarray.c
@@ -257,7 +257,7 @@ static void xa_node_free(struct xa_node *node)
{
XA_NODE_BUG_ON(node, !list_empty(&node->private_list));
node->array = XA_RCU_FREE;
- call_rcu(&node->rcu_head, radix_tree_node_rcu_free);
+ call_rcu_lazy(&node->rcu_head, radix_tree_node_rcu_free);
}
/*
--
2.37.2.609.g9ff673ca1a-goog
Powered by blists - more mailing lists