All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/7] rcutorture: Rewrite RCU priority-boost test around a CPU-hungry reader
@ 2026-11-11 21:38 Joel Fernandes
  2026-11-11 21:38 ` [PATCH RFC 1/7] " Joel Fernandes
                   ` (7 more replies)
  0 siblings, 8 replies; 15+ messages in thread
From: Joel Fernandes @ 2026-11-11 21:38 UTC (permalink / raw)
  To: paulmck, rcu, linux-kernel
  Cc: Sebastian Andrzej Siewior, Frederic Weisbecker, Neeraj Upadhyay,
	Boqun Feng, Joel Fernandes, Josh Triplett, Uladzislau Rezki,
	Steven Rostedt, Mathieu Desnoyers, Lai Jiangshan, Zqiang,
	Davidlohr Bueso, Jonathan Corbet, Shuah Khan, linux-doc,
	linux-kselftest

Hi,

This RFC rewrites rcutorture's RCU priority-boost test so that it no longer
depends on disabling RT throttling and no longer infers boost failure from a
grace period merely taking too long, which is fragile.

The idea: make the to-be-boosted reader need a *lot* of CPU time, more than
throttling could ever give it within the test window.  Each test interval,
one CPU runs a SCHED_NORMAL reader that sits in an RCU read-side critical
section and spins until it has consumed test_boost_reader_ms of CPU time
(default 2000 ms), measured with the task's sum_exec_runtime so time spent
preempted does not count.  A SCHED_FIFO hog on the same CPU tries to starve
it, and a grace period is started so the reader blocks it.  An unboosted
reader only gets what the throttling leaves it, about 5% of the CPU
(~200 ms over the 4 s test_boost_duration), so it cannot finish.  If it does
finish in time, boosting worked.  If not, it is counted as a boost failure.

Related work: Sebastian's recent series on the DL fair_server taking over RT
throttling [1], with its RFC [2], also touches rcutorture's handling of RT
throttling. This patch should simplify or make those patches unnecessary.

Testing, all with kvm.sh on an x86 host, --duration 10 and
--bootargs "rcutorture.test_boost=2" (which forces the test on in scenarios
whose .boot file disables it), 10 minutes per scenario:

  Scenario      Result    Boost failures / intervals
  TREE01        SUCCESS   0 / 70
  TREE02        SUCCESS   0 / 73
  TREE03        SUCCESS   0 / 71
  TREE08        SUCCESS   0 / 74
  TREE09        SUCCESS   0 / 59
  BUSTED-BOOST  FAILURE   82 / 84   (expected, boosting disabled)

BUSTED-BOOST boots with rcutree.boost_disable=1 (patches 5-7), so its failures
show that the test catches broken boosting.  Each failure reports e.g. "Boost
inversion: reader got only 203 of 2000 ms CPU in 4003 jiffies", the CPU time
throttling leaves an unboosted task.

The series applies on top of the rcu/next tree.

[1] https://lore.kernel.org/all/20261110-sched_dl-v2-0-cc9399f7aeb1@linutronix.de/
[2] https://lore.kernel.org/all/20261023161348.t3lpPLQZ@linutronix.de/

Joel Fernandes (7):
  rcutorture: Rewrite RCU priority-boost test around a CPU-hungry reader
  rcutorture: Stop disabling RT throttling for boost testing
  rcutorture: Remove unused check_boost_failed hook
  doc: Document rcutorture.test_boost_reader_ms
  rcu: Add rcutree.boost_disable to disable priority boosting at runtime
  doc: Document rcutree.boost_disable
  rcutorture: Make BUSTED-BOOST disable RCU priority boosting

 .../admin-guide/kernel-parameters.txt         |  14 ++
 kernel/rcu/rcutorture.c                       | 192 +++++++++---------
 kernel/rcu/tree_plugin.h                      |   5 +-
 .../rcutorture/configs/rcu/BUSTED-BOOST.boot  |   1 +
 4 files changed, 116 insertions(+), 96 deletions(-)


base-commit: 44646ae309330530a23e1e4c44fd47d274cfd0ea
-- 
2.54.0


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2026-11-13 16:36 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-11 21:38 [PATCH RFC 0/7] rcutorture: Rewrite RCU priority-boost test around a CPU-hungry reader 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 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-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

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.