[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200214225305.48550d6a@oasis.local.home>
Date: Fri, 14 Feb 2020 22:53:05 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: paulmck@...nel.org
Cc: rcu@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-team@...com, mingo@...nel.org, jiangshanlai@...il.com,
dipankar@...ibm.com, akpm@...ux-foundation.org,
mathieu.desnoyers@...icios.com, josh@...htriplett.org,
tglx@...utronix.de, peterz@...radead.org, dhowells@...hat.com,
edumazet@...gle.com, fweisbec@...il.com, oleg@...hat.com,
joel@...lfernandes.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH tip/core/rcu 22/30] rcu: Don't flag non-starting GPs
before GP kthread is running
On Fri, 14 Feb 2020 15:55:59 -0800
paulmck@...nel.org wrote:
> @@ -1252,10 +1252,10 @@ static bool rcu_future_gp_cleanup(struct rcu_node *rnp)
> */
> static void rcu_gp_kthread_wake(void)
> {
> - if ((current == rcu_state.gp_kthread &&
> + if ((current == READ_ONCE(rcu_state.gp_kthread) &&
> !in_irq() && !in_serving_softirq()) ||
> !READ_ONCE(rcu_state.gp_flags) ||
> - !rcu_state.gp_kthread)
> + !READ_ONCE(rcu_state.gp_kthread))
> return;
This looks buggy. You have two instances of
READ_ONCE(rcu_state.gp_thread), which means they can be different. Is
that intentional?
-- Steve
Powered by blists - more mailing lists