diff options
| author | Paul E. McKenney <paulmck@kernel.org> | 2025-11-15 19:07:41 -0800 |
|---|---|---|
| committer | Joel Fernandes <joelagnelf@nvidia.com> | 2026-03-30 15:48:13 -0400 |
| commit | c6f4e552e1eae4a5726230254108213b085e1ae3 (patch) | |
| tree | fdc2b13626bcb2968747219901970cc7084d3e3b /include/linux | |
| parent | 7aaa8047eafd0bd628065b15757d9b48c5f9c07d (diff) | |
rcutorture: Add a textbook-style trivial preemptible RCU
This commit adds a trivial textbook implementation of preemptible RCU
to rcutorture ("torture_type=trivial-preempt"), similar in spirit to the
existing "torture_type=trivial" textbook implementation of non-preemptible
RCU. Neither trivial RCU implementation has any value for production use,
and are intended only to keep Paul honest in his introductory writings
and presentations.
[ paulmck: Apply kernel test robot feedback. ]
Signed-off-by: Joel Fernandes <joelagnelf@nvidia.com>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 5a5d3dbc9cdf..ffb2ad9716f0 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -949,6 +949,10 @@ struct task_struct { struct srcu_ctr __percpu *trc_reader_scp; #endif /* #ifdef CONFIG_TASKS_TRACE_RCU */ +#ifdef CONFIG_TRIVIAL_PREEMPT_RCU + int rcu_trivial_preempt_nesting; +#endif /* #ifdef CONFIG_TRIVIAL_PREEMPT_RCU */ + struct sched_info sched_info; struct list_head tasks; |
