From: Joel Fernandes <joelagnelf@nvidia.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: paulmck@kernel.org, rcu@vger.kernel.org,
linux-kernel@vger.kernel.org,
Frederic Weisbecker <frederic@kernel.org>,
Neeraj Upadhyay <neeraj.upadhyay@kernel.org>,
Boqun Feng <boqun@kernel.org>,
Josh Triplett <josh@joshtriplett.org>,
Uladzislau Rezki <urezki@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Zqiang <qiang.zhang@linux.dev>,
Davidlohr Bueso <dave@stgolabs.net>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH RFC 1/7] rcutorture: Rewrite RCU priority-boost test around a CPU-hungry reader
Date: Fri, 13 Nov 2026 16:20:44 -0500 [thread overview]
Message-ID: <a134c923-ddb0-4ac1-8b99-473a0472aa53@nvidia.com> (raw)
In-Reply-To: <20261113155301.Rs-PyiuR@linutronix.de>
On 11/13/2026 10:53 AM, Sebastian Andrzej Siewior wrote:
> On 2026-11-11 16:38:19 [-0500], Joel Fernandes wrote:
>> The old boost test relies on RT throttling being disabled and on grace
>> periods taking too long, which is fragile. Instead, each interval one
>> CPU runs a normal-priority reader that spins inside an RCU read-side
>> critical section until it has consumed test_boost_reader_ms of CPU time
>> (measured via sum_exec_runtime, so time spent preempted does not count),
>> while a SCHED_FIFO hog on the same CPU tries to starve it. With RT
>> throttling enabled, an unboosted reader gets only about 5% of the CPU,
>> far less than it needs within test_boost_duration. If the reader
>> finishes, boosting worked, otherwise it failed.
>
> What I see from tracing is:
>
> | rcu_torture_boo-2066 [001] d..2. 237.448002: sched_switch: prev_comm=rcu_torture_boo prev_pid=2066 prev_prio=120 prev_state=R+ ==> next_comm=rcu_torture_boo next_pid=93 next_prio=98
>
> preempted as SCHED_OTHER
>
> | rcub/0-16 [003] d..3. 237.460085: sched_pi_setprio: comm=rcu_torture_boo pid=2066 oldprio=120 newprio=97
>
> boosted shortly after
>
> | rcu_torture_boo-93 [001] d..2. 237.460108: sched_switch: prev_comm=rcu_torture_boo prev_pid=93 prev_prio=98 prev_state=R+ ==> next_comm=rcu_torture_boo next_pid=2066 next_prio=97
> | rcu_torture_boo-2066 [001] d.h1. 237.463994: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=3908069 [ns]
> | rcu_torture_boo-2066 [001] d.h1. 237.467985: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=3991212 [ns]
> | rcu_torture_boo-2066 [001] d.h1. 237.471995: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=4009726 [ns]
>
> back on CPU and not pushed away.
> | rcu_torture_boo-2066 [001] dN.2. 238.397969: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=5311 [ns]
> | rcu_torture_boo-2066 [001] d..2. 238.397975: sched_switch: prev_comm=rcu_torture_boo prev_pid=2066 prev_prio=97 prev_state=R+ ==> next_comm=kworker/1:3 next_pid=1386 next_prio=120
> | kworker/1:1H-745 [001] d..2. 238.398067: sched_switch: prev_comm=kworker/1:1H prev_pid=745 prev_prio=100 prev_state=I ==> next_comm=rcu_torture_boo next_pid=2066 next_prio=97
> | rcu_torture_boo-2066 [001] d.s3. 238.398122: sched_waking: comm=kworker/1:3 pid=1386 prio=120 target_cpu=001
> | rcu_torture_boo-2066 [001] d.s4. 238.398124: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=63431 [ns]
> | rcu_torture_boo-2066 [001] dNs4. 238.398128: sched_wakeup: comm=kworker/1:3 pid=1386 prio=120 target_cpu=001
> | rcu_torture_boo-2066 [001] d..2. 238.398130: sched_switch: prev_comm=rcu_torture_boo prev_pid=2066 prev_prio=97 prev_state=R+ ==> next_comm=kworker/1:3 next_pid=1386 next_prio=120
> | kworker/1:3-1386 [001] d..2. 238.398137: sched_switch: prev_comm=kworker/1:3 prev_pid=1386 prev_prio=120 prev_state=I ==> next_comm=rcu_torture_boo next_pid=2066 next_prio=97
> | rcu_torture_boo-2066 [001] d.h1. 238.399986: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=1851337 [ns]
> | rcu_torture_boo-2066 [001] d.h1. 238.400081: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=94860 [ns]
>
> The fair_server preempts now and then.
> | rcu_torture_boo-2066 [001] d.h1. 239.455988: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=4002590 [ns]
> | rcu_torture_boo-2066 [001] d..3. 239.455999: sched_waking: comm=rcu_preempt pid=15 prio=97 target_cpu=000
> | rcu_torture_boo-2066 [001] d..3. 239.456012: sched_waking: comm=rcu_exp_gp_kthr pid=18 prio=120 target_cpu=002
> | rcu_torture_boo-2066 [001] d..3. 239.456023: sched_pi_setprio: comm=rcu_torture_boo pid=2066 oldprio=97 newprio=120
> | rcu_torture_boo-2066 [001] d..3. 239.456024: sched_stat_runtime: comm=rcu_torture_boo pid=2066 runtime=35773 [ns]
> | rcu_torture_boo-2066 [001] d..2. 239.456032: sched_switch: prev_comm=rcu_torture_boo prev_pid=2066 prev_prio=120 prev_state=R+ ==> next_comm=rcu_torture_boo next_pid=93 next_prio=98
>
> Leaving the RCU section and getting de-boosted.
>
> This looks good.
>
Thank you for testing! I went through your other suggestions and they mostly
look good to me, so I will revise the series and post a v2.
> …
>
>> Success testing: with the series applied and no other changes, run
>> TREE01 TREE02 TREE03 TREE08 TREE09 BUSTED-BOOST for 10 minutes each.
>> Every scenario ended "SUCCESS" with rtbf (boost failures) of 0 in 59 to
>> 83 boost intervals. (BUSTED-BOOST can no longer fail by construction
>> because CONFIG_RCU_BOOST is now enabled automatically for preemptible
>> RCU.)
>
> I didn't run the individual tests but checked in my rcu-tree setup that
> boosting works as it should and that it complains once it does not. And
> the throttling of the RT tasks has no visible impact.
Excellent, thanks!
Joel Fernandes
next prev parent reply other threads:[~2026-11-13 21:20 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 21:38 [PATCH RFC 0/7] " Joel Fernandes
2026-11-11 21:38 ` [PATCH RFC 1/7] " Joel Fernandes
2026-11-13 12:01 ` Sebastian Andrzej Siewior
2026-11-13 15:53 ` Sebastian Andrzej Siewior
2026-11-13 21:20 ` Joel Fernandes [this message]
2026-11-13 16:19 ` Sebastian Andrzej Siewior
2026-11-11 21:38 ` [PATCH RFC 2/7] rcutorture: Stop disabling RT throttling for boost testing Joel Fernandes
2026-11-13 15:56 ` Sebastian Andrzej Siewior
2026-11-13 21:22 ` Joel Fernandes
2026-11-11 21:38 ` [PATCH RFC 3/7] rcutorture: Remove unused check_boost_failed hook Joel Fernandes
2026-11-13 16:00 ` Sebastian Andrzej Siewior
2026-11-11 21:38 ` [PATCH RFC 4/7] doc: Document rcutorture.test_boost_reader_ms Joel Fernandes
2026-11-11 21:38 ` [PATCH RFC 5/7] rcu: Add rcutree.boost_disable to disable priority boosting at runtime Joel Fernandes
2026-11-13 16:36 ` Sebastian Andrzej Siewior
2026-11-11 21:38 ` [PATCH RFC 6/7] doc: Document rcutree.boost_disable Joel Fernandes
2026-11-11 21:38 ` [PATCH RFC 7/7] rcutorture: Make BUSTED-BOOST disable RCU priority boosting Joel Fernandes
2026-11-13 10:55 ` [PATCH RFC 0/7] rcutorture: Rewrite RCU priority-boost test around a CPU-hungry reader Sebastian Andrzej Siewior
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=a134c923-ddb0-4ac1-8b99-473a0472aa53@nvidia.com \
--to=joelagnelf@nvidia.com \
--cc=bigeasy@linutronix.de \
--cc=boqun@kernel.org \
--cc=corbet@lwn.net \
--cc=dave@stgolabs.net \
--cc=frederic@kernel.org \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=neeraj.upadhyay@kernel.org \
--cc=paulmck@kernel.org \
--cc=qiang.zhang@linux.dev \
--cc=rcu@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=skhan@linuxfoundation.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
all inboxes | Powered by JetHome®