[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210803160021.GR4397@paulmck-ThinkPad-P17-Gen-1>
Date: Tue, 3 Aug 2021 09:00:21 -0700
From: "Paul E. McKenney" <paulmck@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
Peter Zijlstra <peterz@...radead.org>,
Josh Triplett <josh@...htriplett.org>,
Steven Rostedt <rostedt@...dmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Lai Jiangshan <jiangshanlai@...il.com>,
Joel Fernandes <joel@...lfernandes.org>, rcu@...r.kernel.org
Subject: Re: [PATCH 31/38] rcu: Replace deprecated CPU-hotplug functions.
On Tue, Aug 03, 2021 at 04:16:14PM +0200, Sebastian Andrzej Siewior wrote:
> The functions get_online_cpus() and put_online_cpus() have been
> deprecated during the CPU hotplug rework. They map directly to
> cpus_read_lock() and cpus_read_unlock().
>
> Replace deprecated CPU-hotplug functions with the official version.
> The behavior remains unchanged.
>
> Cc: "Paul E. McKenney" <paulmck@...nel.org>
> Cc: Josh Triplett <josh@...htriplett.org>
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
> Cc: Lai Jiangshan <jiangshanlai@...il.com>
> Cc: Joel Fernandes <joel@...lfernandes.org>
> Cc: rcu@...r.kernel.org
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
I have queued this one and 35/38 (rcutorture) for v5.16. If you would
prefer to send them some other route, please let me know and:
Acked-by: Paul E. McKenney <paulmck@...nel.org>
> ---
> kernel/rcu/tree.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
> index 51f24ecd94b26..f116ce58f4e68 100644
> --- a/kernel/rcu/tree.c
> +++ b/kernel/rcu/tree.c
> @@ -4050,7 +4050,7 @@ void rcu_barrier(void)
> */
> init_completion(&rcu_state.barrier_completion);
> atomic_set(&rcu_state.barrier_cpu_count, 2);
> - get_online_cpus();
> + cpus_read_lock();
>
> /*
> * Force each CPU with callbacks to register a new callback.
> @@ -4081,7 +4081,7 @@ void rcu_barrier(void)
> rcu_state.barrier_sequence);
> }
> }
> - put_online_cpus();
> + cpus_read_unlock();
>
> /*
> * Now that we have an rcu_barrier_callback() callback on each
> --
> 2.32.0
>
Powered by blists - more mailing lists