From: Frederic Weisbecker <frederic@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Uladzislau Rezki <urezki@gmail.com>,
Boqun Feng <boqun.feng@gmail.com>,
Neeraj Upadhyay <neeraju@codeaurora.org>,
Josh Triplett <josh@joshtriplett.org>,
Joel Fernandes <joel@joelfernandes.org>,
rcu@vger.kernel.org
Subject: Re: [PATCH] rcu/nocb: Fix misordered rcu_barrier() while (de-)offloading
Date: Mon, 18 Oct 2021 23:50:46 +0200 [thread overview]
Message-ID: <20211018215046.GA453817@lothringen> (raw)
In-Reply-To: <20211018183604.GT880162@paulmck-ThinkPad-P17-Gen-1>
On Mon, Oct 18, 2021 at 11:36:04AM -0700, Paul E. McKenney wrote:
> On Mon, Oct 18, 2021 at 07:42:42PM +0200, Frederic Weisbecker wrote:
> > I think you're right. The real issue is something I wanted to
> > fix next: RCU_SEGCBLIST_RCU_CORE isn't cleared when nocb is enabled on
> > boot so rcu_core() always run concurrently with nocb kthreads in TREE04,
> > without holding rcu_barrier mutex of course (I mean with the latest patchset).
>
> That would do it!
>
> > Ok forget this patch, I'm testing again with simply clearing
> > RCU_SEGCBLIST_RCU_CORE on boot.
>
> Sounds good, looking forward to it!
So yes that was indeed the real issue. I've pushed an "rcu/rt-v3" branch
which is the same as your dev.2021.10.07a branch but the first patch
"rcu/nocb: Prepare state machine for a new step" has this added:
diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h
index 3b470113ae38..2461fe8d0c23 100644
--- a/kernel/rcu/tree_nocb.h
+++ b/kernel/rcu/tree_nocb.h
@@ -1171,8 +1171,8 @@ void __init rcu_init_nohz(void)
if (rcu_segcblist_empty(&rdp->cblist))
rcu_segcblist_init(&rdp->cblist);
rcu_segcblist_offload(&rdp->cblist, true);
- rcu_segcblist_set_flags(&rdp->cblist, SEGCBLIST_KTHREAD_CB);
- rcu_segcblist_set_flags(&rdp->cblist, SEGCBLIST_KTHREAD_GP);
+ rcu_segcblist_set_flags(&rdp->cblist, SEGCBLIST_KTHREAD_CB | SEGCBLIST_KTHREAD_GP);
+ rcu_segcblist_clear_flags(&rdp->cblist, SEGCBLIST_RCU_CORE);
}
rcu_organize_nocb_kthreads();
}
I still see the oom though, hopefully my series just makes an existing
problem more likely to happen.
Thanks.
next prev parent reply other threads:[~2021-10-18 21:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 11:32 [PATCH] rcu/nocb: Fix misordered rcu_barrier() while (de-)offloading Frederic Weisbecker
2021-10-18 16:18 ` Paul E. McKenney
2021-10-18 17:42 ` Frederic Weisbecker
2021-10-18 18:36 ` Paul E. McKenney
2021-10-18 21:50 ` Frederic Weisbecker [this message]
2021-10-18 22:34 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211018215046.GA453817@lothringen \
--to=frederic@kernel.org \
--cc=boqun.feng@gmail.com \
--cc=joel@joelfernandes.org \
--cc=josh@joshtriplett.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraju@codeaurora.org \
--cc=paulmck@kernel.org \
--cc=rcu@vger.kernel.org \
--cc=urezki@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox