Skip to contentSkip to conversation

RCU changes for v7.1

GIT PULL Merged Joel Fernandes 4 participants 7 messages Mar 31 – Apr 13 RCU

lore
Share & tools
lore

Joel Fernandes

author maintainer
#0 lore raw

Hi Linus,

Once the merge window opens, please pull the following RCU changes for v7.1.

The following changes since commit 7aaa8047eafd0bd628065b15757d9b48c5f9c07d:

Linux 7.0-rc6 (2026-03-29 15:40:00 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git tags/rcu.2026.03.31a

for you to fetch changes up to 95c7d025cc8c3c6c41206e2a18332eb04878b7ef:

rcutorture: Test call_srcu() with preemption disabled and not (2026-03-30 15:48:14 -0400)

----------------------------------------------------------------
RCU changes for v7.1

NOCB CPU management:

- Consolidate rcu_nocb_cpu_offload() and rcu_nocb_cpu_deoffload() to reduce code duplication.
- Extract nocb_bypass_needs_flush() helper to reduce duplication in NOCB bypass path.

rcutorture/torture infrastructure:

- Add NOCB01 config for RCU_LAZY torture testing.
- Add NOCB02 config for NOCB poll mode testing.
- Add TRIVIAL-PREEMPT config for textbook-style preemptible RCU torture.
- Test call_srcu() with preemption both disabled and enabled.
- Remove kvm-check-branches.sh in favor of kvm-series.sh.
- Make hangs more visible in torture.sh output.
- Add informative message for tests without a recheck file.
- Fix numeric test comparison in srcu_lockdep.sh.
- Use torture_shutdown_init() in refscale and rcuscale instead of open-coded shutdown functions.
- Fix modulo-zero error in torture_hrtimeout_ns().

SRCU:

- Fix SRCU read flavor macro comments.
- Fix s/they disables/they disable/ typo in srcu_read_unlock_fast().

RCU Tasks:

- Document that RCU Tasks Trace grace periods now imply RCU grace periods.
- Remove unnecessary smp_store_release() in cblist_init_generic().

RCU stall:

- Add BOOTPARAM_RCU_STALL_PANIC Kconfig option to allow triggering a kernel panic on RCU stall via kernel boot parameter.

----------------------------------------------------------------
Gustavo Luiz Duarte (1):
rcu: Add BOOTPARAM_RCU_STALL_PANIC Kconfig option

Joel Fernandes (4):
rcutorture: Add NOCB01 config for RCU_LAZY torture testing
rcutorture: Add NOCB02 config for nocb poll mode testing rcu/nocb: Consolidate rcu_nocb_cpu_offload/deoffload functions rcu/nocb: Extract nocb_bypass_needs_flush() to reduce duplication

Paul E. McKenney (12):
rcutorture: Add a textbook-style trivial preemptible RCU kvm-check-branches.sh: Remove in favor of kvm-series.sh
torture: Make hangs more visible in torture.sh output
torture: Print informative message for test without recheck file
rcutorture: Fix numeric "test" comparison in srcu_lockdep.sh
refscale: Ditch ref_scale_shutdown in favor of torture_shutdown_init()
rcuscale: Ditch rcu_scale_shutdown in favor of torture_shutdown_init()
srcu: Fix SRCU read flavor macro comments
srcu: Fix s/they disables/they disable/ typo in srcu_read_unlock_fast()
rcu-tasks: Document that RCU Tasks Trace grace periods now imply RCU grace periods
torture: Avoid modulo-zero error in torture_hrtimeout_ns()
rcutorture: Test call_srcu() with preemption disabled and not

Zqiang (1):
rcu-tasks: Remove unnecessary smp_store_release() in cblist_init_generic()

 .../RCU/Design/Requirements/Requirements.rst       |   7 ++
 include/linux/rcupdate.h                           |   9 +-
 include/linux/sched.h                              |   4 +
 include/linux/srcu.h                               |   4 +-
 include/linux/srcutree.h                           |   2 +-
 kernel/rcu/Kconfig.debug                           |  35 ++++++
 kernel/rcu/rcu.h                                   |   4 +
 kernel/rcu/rcuscale.c                              |  78 ++++--------
 kernel/rcu/rcutorture.c                            |  64 +++++++++-
 kernel/rcu/refscale.c                              |  51 +++-----
 kernel/rcu/tasks.h                                 |   6 +-
 kernel/rcu/tree_nocb.h                             | 137 ++++++++++++---------
 kernel/rcu/tree_stall.h                            |   2 +-
 kernel/rcu/update.c                                |  22 ++++
 kernel/torture.c                                   |   2 +-
 .../selftests/rcutorture/bin/kvm-check-branches.sh | 102 ---------------
 .../selftests/rcutorture/bin/kvm-recheck.sh        |   9 +-
 .../selftests/rcutorture/bin/parse-console.sh      |   1 -
 .../selftests/rcutorture/bin/srcu_lockdep.sh       |   6 +-
 .../selftests/rcutorture/configs/rcu/NOCB01        |  21 ++++
 .../selftests/rcutorture/configs/rcu/NOCB01.boot   |   2 +
 .../selftests/rcutorture/configs/rcu/NOCB02        |  20 +++
 .../selftests/rcutorture/configs/rcu/NOCB02.boot   |   3 +
 .../rcutorture/configs/rcu/TRIVIAL-PREEMPT         |  12 ++
 .../rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot    |   3 +
 .../rcutorture/configs/rcuscale/ver_functions.sh   |   2 +-
 .../rcutorture/configs/refscale/ver_functions.sh   |   2 +-
 27 files changed, 334 insertions(+), 276 deletions(-)
 delete mode 100755 tools/testing/selftests/rcutorture/bin/kvm-check-branches.sh
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/NOCB01
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/NOCB01.boot
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/NOCB02
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/NOCB02.boot
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT
 create mode 100644 tools/testing/selftests/rcutorture/configs/rcu/TRIVIAL-PREEMPT.boot
Signature · 1 line
Joel Fernandes
#1 lore raw
Quoted 5 lines · Joel Fernandes

RCU stall:

- Add BOOTPARAM_RCU_STALL_PANIC Kconfig option to allow triggering a kernel panic on RCU stall via kernel boot parameter.

No.

Dammit, stop doing these horrible things.

I've said this a million times by now: the kernel config phase is probably one of the biggest pain points for random new people trying to build their own kernels, and we DO NOT ASK PEOPLE STUIPID THINGS.

People who want this can damn well use the sysctl or maybe some kernel command line option instead, and we DO NOT MAKE LIFE WORSE FOR EVERYBODY ELSE.

I have removed that disgusting kernel kconfig option, and I want to make it very clear to people that the kconfig files aren't your personal playgrounds: they are the most visible interface to NORMAL USERS that we want to encourage to build their own kernels so that they can participate in kernel development.

So people: next time you feel the urge to add a Kconfig option, take a deep breath, and look at that Kconfig file, and go "Maybe I can instead remove this *other* useless option instead".

Let's *improve* on the kernel instead of making things worse.

Linus

maintainer
#2 lore raw
Quoted 25 lines · Linus Torvalds
Quoted 5 lines · Joel Fernandes

RCU stall:

- Add BOOTPARAM_RCU_STALL_PANIC Kconfig option to allow triggering a kernel panic on RCU stall via kernel boot parameter.

No.

Dammit, stop doing these horrible things.

I've said this a million times by now: the kernel config phase is probably one of the biggest pain points for random new people trying to build their own kernels, and we DO NOT ASK PEOPLE STUIPID THINGS.

People who want this can damn well use the sysctl or maybe some kernel command line option instead, and we DO NOT MAKE LIFE WORSE FOR EVERYBODY ELSE.

I have removed that disgusting kernel kconfig option, and I want to make it very clear to people that the kconfig files aren't your personal playgrounds: they are the most visible interface to NORMAL USERS that we want to encourage to build their own kernels so that they can participate in kernel development.

Quoted 5 lines

So people: next time you feel the urge to add a Kconfig option, take a deep breath, and look at that Kconfig file, and go "Maybe I can instead remove this *other* useless option instead".

Let's *improve* on the kernel instead of making things worse.

Apologies! Would making this instead be a kernel boot parameter be acceptable?

Thanx, Paul

#3 lore raw
Quoted 3 lines · Paul E. McKenney

Apologies! Would making this instead be a kernel boot parameter be acceptable?

We already have a sysctl for it, and you should *already* be able to use a boot parameter for it with just

sysctl.kernel.panic_on_rcu_stall=true

Not that I've tried it, so maybe there's some bug somewhere (or something I've overlooked), but I really think the whole kernel config option was entirely redundant to begin with.

Linus

maintainer
#4 lore raw
Quoted 9 lines · Linus Torvalds
Quoted 3 lines · Paul E. McKenney

Apologies! Would making this instead be a kernel boot parameter be acceptable?

We already have a sysctl for it, and you should *already* be able to use a boot parameter for it with just

sysctl.kernel.panic_on_rcu_stall=true

Thank you, and testing is in progress.

Quoted 3 lines

Not that I've tried it, so maybe there's some bug somewhere (or something I've overlooked), but I really think the whole kernel config option was entirely redundant to begin with.

Given recent improvements to bootconfig, using the sysctl kernel boot parameter should be just fine.

Before those improvements, associating particular kernel boot parameters with all kernels was often problematic in large sets of datacenters. Even worse were cases where kernel boot parameters needed to be set differently for different kernel versions. But for most kernel boot parameters (including this one), things should be fine now.

More work is needed for early boot parameters, and that is in progress.

In this case, I simply failed to get all the pieces in my head at the same time. In particular, I forgot that you can specify kernel boot parameters for sysctls. :-/

Thanx, Paul

author maintainer
#5 lore raw
In reply to Linus Torvalds
Quoted 19 lines · Linus Torvalds
Quoted 5 lines · Joel Fernandes

RCU stall:

- Add BOOTPARAM_RCU_STALL_PANIC Kconfig option to allow triggering a kernel panic on RCU stall via kernel boot parameter.

No.

Dammit, stop doing these horrible things.

I've said this a million times by now: the kernel config phase is probably one of the biggest pain points for random new people trying to build their own kernels, and we DO NOT ASK PEOPLE STUIPID THINGS.

People who want this can damn well use the sysctl or maybe some kernel command line option instead, and we DO NOT MAKE LIFE WORSE FOR EVERYBODY ELSE.

Quoted 5 lines

I have removed that disgusting kernel kconfig option, and I want to make it very clear to people that the kconfig files aren't your personal playgrounds: they are the most visible interface to NORMAL USERS that we want to encourage to build their own kernels so that they can participate in kernel development.

Linus, I am Ok with dropping it and thanks for doing that, no problem. sysctl sounds like a good option to me (CC'ing the patch author, Gustavo, as well in case they want to go this route).

Regarding boot params, I guess I would like to add - sometimes it is difficult for people to change kernel boot params (coming from the Android world, I remember setting boot params required changing and recompiling the bootloader, and it was much easier to recompile the kernel than the bootloader. The bootloader came from flash memory and required special signing processes etc).

That said, I totally agree with not polluting and complicating Kconfig unnecessarily.

Quoted 4 lines

So people: next time you feel the urge to add a Kconfig option, take a deep breath, and look at that Kconfig file, and go "Maybe I can instead remove this *other* useless option instead".

Noted, though, in this case "removing the other option which is to panic-on-stall" does not help, because not everyone will want to panic-on-stall by default? So sysctl to turn on the feature maybe makes sense (for those who prefer that over boot parameters).

thanks,

--
Joel Fernandes

merge bot Merged
#6 lore raw
In reply to Joel Fernandes
The pull request you sent on Tue, 31 Mar 2026 13:42:00 -0400:

The pull request you sent on Tue, 31 Mar 2026 13:42:00 -0400:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git tags/rcu.2026.03.31a

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/28483203f7d7fe4f123ed08266c381fac96b0701

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html