From: Frederic Weisbecker <frederic@kernel.org>
To: "Cheng-Jui Wang (王正睿)" <Cheng-Jui.Wang@mediatek.com>
Cc: "qiang.zhang1211@gmail.com" <qiang.zhang1211@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"neeraj.upadhyay@amd.com" <neeraj.upadhyay@amd.com>,
"paulmck@kernel.org" <paulmck@kernel.org>,
"Bobule Chang (張弘義)" <bobule.chang@mediatek.com>,
"boqun.feng@gmail.com" <boqun.feng@gmail.com>,
"urezki@gmail.com" <urezki@gmail.com>,
"joel@joelfernandes.org" <joel@joelfernandes.org>,
"rcu@vger.kernel.org" <rcu@vger.kernel.org>
Subject: Re: [PATCH 2/3] rcu: Defer RCU kthreads wakeup when CPU is dying
Date: Mon, 12 Aug 2024 13:13:54 +0200 [thread overview]
Message-ID: <ZrnuctZQS4DTSb0q@localhost.localdomain> (raw)
In-Reply-To: <65b6b97a6f61f80c5f1ea1f245eea392a0de5523.camel@mediatek.com>
Le Mon, Aug 12, 2024 at 09:10:56AM +0000, Cheng-Jui Wang (王正睿) a écrit :
> On Wed, 2023-12-20 at 16:13 +0100, Frederic Weisbecker wrote:
> > Le Wed, Dec 20, 2023 at 04:24:35PM +0800, Z qiang a écrit :
> > > >
> > >
> > > In the rcutree_report_cpu_dead(), the rcuog kthreads may also be
> > > wakeup in
> > > do_nocb_deferred_wakeup(), if the rcuog kthreads is rt-fifo and
> > > wakeup happen,
> > > the rt_period_active is set 1 and enqueue hrtimer to offline CPU in
> > > do_start_rt_bandwidth(),
> > > after that, we invoke swake_up_one_online() send ipi to online CPU,
> > > due to the
> > > rt_period_active is 1, the rt-bandwith hrtimer will not enqueue to
> > > online CPU.
> > > any thoughts?
> >
> > Duh, you're right, that one too. How many more? This hrtimer
> > situation is scary...
> >
> > Thanks.
>
> I encountered the issue pointed out by Z Qiang on kernel-6.6, which
> cause RT tasks on the CPU to never be scheduled, leading to a system
> reboot. It triggered the WARN_ON_ONCE(!base->cpu_base->online)
> introduced in [PATCH 1/3]. Below is the call trace:
>
> Call trace:
> enqueue_hrtimer+0x7c/0xf8
> hrtimer_start_range_ns+0x2b8/0x300
> enqueue_task_rt+0x298/0x3f0
> enqueue_task+0x94/0x188
> ttwu_do_activate+0xb4/0x27c
> try_to_wake_up+0x2d8/0x79c
> wake_up_process+0x18/0x28
> __wake_nocb_gp+0x80/0x1a0
> do_nocb_deferred_wakeup_common+0x3c/0xcc
> rcu_report_dead+0x68/0x1ac
> cpuhp_report_idle_dead+0x48/0x9c
> do_idle+0x288/0x294
> cpu_startup_entry+0x34/0x3c
> secondary_start_kernel+0x138/0x158
This means you are setting rcuo kthreads as real time
tasks. I would be curious about your usecase.
Anyway I'm working on a fix. Thanks!
next prev parent reply other threads:[~2024-08-12 11:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 23:19 [PATCH 0/3] timers & RCU: Fix TREE03 stalls Frederic Weisbecker
2023-12-18 23:19 ` [PATCH 1/3] hrtimer: Report offline hrtimer enqueue Frederic Weisbecker
2023-12-18 23:19 ` [PATCH 2/3] rcu: Defer RCU kthreads wakeup when CPU is dying Frederic Weisbecker
2023-12-19 3:38 ` Joel Fernandes
2023-12-19 11:56 ` Frederic Weisbecker
2023-12-20 3:01 ` Joel Fernandes
2023-12-20 15:50 ` Frederic Weisbecker
2023-12-21 0:57 ` Paul E. McKenney
2023-12-19 4:42 ` Hillf Danton
2023-12-19 23:42 ` Frederic Weisbecker
2023-12-19 15:29 ` Paul E. McKenney
2023-12-19 15:47 ` Frederic Weisbecker
2023-12-20 8:24 ` Z qiang
2023-12-20 15:13 ` Frederic Weisbecker
2024-08-12 9:10 ` Cheng-Jui Wang (王正睿)
2024-08-12 11:13 ` Frederic Weisbecker [this message]
2024-08-12 11:53 ` Cheng-Jui Wang (王正睿)
2023-12-18 23:19 ` [PATCH 3/3] rcu/exp: Remove full barrier upon main thread wakeup Frederic Weisbecker
2023-12-19 1:40 ` [PATCH 0/3] timers & RCU: Fix TREE03 stalls 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=ZrnuctZQS4DTSb0q@localhost.localdomain \
--to=frederic@kernel.org \
--cc=Cheng-Jui.Wang@mediatek.com \
--cc=bobule.chang@mediatek.com \
--cc=boqun.feng@gmail.com \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neeraj.upadhyay@amd.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=qiang.zhang1211@gmail.com \
--cc=rcu@vger.kernel.org \
--cc=tglx@linutronix.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.