Skip to content

Commit 2656821

Browse files
committed
Merge tag 'rcu-next-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks
Pull RCU updates from Frederic Weisbecker: - RCU torture, locktorture and generic torture infrastructure updates that include various fixes, cleanups and consolidations. Among the user visible things, ftrace dumps can now be found into their own file, and module parameters get better documented and reported on dumps. - Generic and misc fixes all over the place. Some highlights: * Hotplug handling has seen some light cleanups and comments * An RCU barrier can now be triggered through sysfs to serialize memory stress testing and avoid OOM * Object information is now dumped in case of invalid callback invocation * Also various SRCU issues, too hard to trigger to deserve urgent pull requests, have been fixed - RCU documentation updates - RCU reference scalability test minor fixes and doc improvements. - RCU tasks minor fixes - Stall detection updates. Introduce RCU CPU Stall notifiers that allows a subsystem to provide informations to help debugging. Also cure some false positive stalls. * tag 'rcu-next-v6.7' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks: (56 commits) srcu: Only accelerate on enqueue time locktorture: Check the correct variable for allocation failure srcu: Fix callbacks acceleration mishandling rcu: Comment why callbacks migration can't wait for CPUHP_RCUTREE_PREP rcu: Standardize explicit CPU-hotplug calls rcu: Conditionally build CPU-hotplug teardown callbacks rcu: Remove references to rcu_migrate_callbacks() from diagrams rcu: Assume rcu_report_dead() is always called locally rcu: Assume IRQS disabled from rcu_report_dead() rcu: Use rcu_segcblist_segempty() instead of open coding it rcu: kmemleak: Ignore kmemleak false positives when RCU-freeing objects srcu: Fix srcu_struct node grpmask overflow on 64-bit systems torture: Convert parse-console.sh to mktemp rcutorture: Traverse possible cpu to set maxcpu in rcu_nocb_toggle() rcutorture: Replace schedule_timeout*() 1-jiffy waits with HZ/20 torture: Add kvm.sh --debug-info argument locktorture: Rename readers_bind/writers_bind to bind_readers/bind_writers doc: Catch-up update for locktorture module parameters locktorture: Add call_rcu_chains module parameter locktorture: Add new module parameters to lock_torture_print_module_parms() ...
2 parents 9a0f53e + d97ae64 commit 2656821

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+809
-351
lines changed

Documentation/RCU/Design/Expedited-Grace-Periods/Expedited-Grace-Periods.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ operations is carried out at several levels:
181181
of this wait (or series of waits, as the case may be) is to permit a
182182
concurrent CPU-hotplug operation to complete.
183183
#. In the case of RCU-sched, one of the last acts of an outgoing CPU is
184-
to invoke ``rcu_report_dead()``, which reports a quiescent state for
184+
to invoke ``rcutree_report_cpu_dead()``, which reports a quiescent state for
185185
that CPU. However, this is likely paranoia-induced redundancy.
186186

187187
+-----------------------------------------------------------------------+

Documentation/RCU/Design/Memory-Ordering/TreeRCU-callback-registry.svg

Lines changed: 0 additions & 9 deletions
Loading

Documentation/RCU/Design/Memory-Ordering/TreeRCU-gp-fqs.svg

Lines changed: 2 additions & 2 deletions
Loading

Documentation/RCU/Design/Memory-Ordering/TreeRCU-gp.svg

Lines changed: 2 additions & 11 deletions
Loading

Documentation/RCU/Design/Memory-Ordering/TreeRCU-hotplug.svg

Lines changed: 2 additions & 2 deletions
Loading

Documentation/RCU/Design/Requirements/Requirements.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,12 +1955,12 @@ if offline CPUs block an RCU grace period for too long.
19551955

19561956
An offline CPU's quiescent state will be reported either:
19571957

1958-
1. As the CPU goes offline using RCU's hotplug notifier (rcu_report_dead()).
1958+
1. As the CPU goes offline using RCU's hotplug notifier (rcutree_report_cpu_dead()).
19591959
2. When grace period initialization (rcu_gp_init()) detects a
19601960
race either with CPU offlining or with a task unblocking on a leaf
19611961
``rcu_node`` structure whose CPUs are all offline.
19621962

1963-
The CPU-online path (rcu_cpu_starting()) should never need to report
1963+
The CPU-online path (rcutree_report_cpu_starting()) should never need to report
19641964
a quiescent state for an offline CPU. However, as a debugging measure,
19651965
it does emit a warning if a quiescent state was not already reported
19661966
for that CPU.

Documentation/RCU/listRCU.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ One of the most common uses of RCU is protecting read-mostly linked lists
88
that all of the required memory ordering is provided by the list macros.
99
This document describes several list-based RCU use cases.
1010

11+
When iterating a list while holding the rcu_read_lock(), writers may
12+
modify the list. The reader is guaranteed to see all of the elements
13+
which were added to the list before they acquired the rcu_read_lock()
14+
and are still on the list when they drop the rcu_read_unlock().
15+
Elements which are added to, or removed from the list may or may not
16+
be seen. If the writer calls list_replace_rcu(), the reader may see
17+
either the old element or the new element; they will not see both,
18+
nor will they see neither.
19+
1120

1221
Example 1: Read-mostly list: Deferred Destruction
1322
-------------------------------------------------

Documentation/RCU/whatisRCU.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ experiment with should focus on Section 2. People who prefer to start
5959
with example uses should focus on Sections 3 and 4. People who need to
6060
understand the RCU implementation should focus on Section 5, then dive
6161
into the kernel source code. People who reason best by analogy should
62-
focus on Section 6. Section 7 serves as an index to the docbook API
63-
documentation, and Section 8 is the traditional answer key.
62+
focus on Section 6 and 7. Section 8 serves as an index to the docbook
63+
API documentation, and Section 9 is the traditional answer key.
6464

6565
So, start with the section that makes the most sense to you and your
6666
preferred method of learning. If you need to know everything about

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2919,6 +2919,38 @@
29192919
to extract confidential information from the kernel
29202920
are also disabled.
29212921

2922+
locktorture.acq_writer_lim= [KNL]
2923+
Set the time limit in jiffies for a lock
2924+
acquisition. Acquisitions exceeding this limit
2925+
will result in a splat once they do complete.
2926+
2927+
locktorture.bind_readers= [KNL]
2928+
Specify the list of CPUs to which the readers are
2929+
to be bound.
2930+
2931+
locktorture.bind_writers= [KNL]
2932+
Specify the list of CPUs to which the writers are
2933+
to be bound.
2934+
2935+
locktorture.call_rcu_chains= [KNL]
2936+
Specify the number of self-propagating call_rcu()
2937+
chains to set up. These are used to ensure that
2938+
there is a high probability of an RCU grace period
2939+
in progress at any given time. Defaults to 0,
2940+
which disables these call_rcu() chains.
2941+
2942+
locktorture.long_hold= [KNL]
2943+
Specify the duration in milliseconds for the
2944+
occasional long-duration lock hold time. Defaults
2945+
to 100 milliseconds. Select 0 to disable.
2946+
2947+
locktorture.nested_locks= [KNL]
2948+
Specify the maximum lock nesting depth that
2949+
locktorture is to exercise, up to a limit of 8
2950+
(MAX_NESTED_LOCKS). Specify zero to disable.
2951+
Note that this parameter is ineffective on types
2952+
of locks that do not support nested acquisition.
2953+
29222954
locktorture.nreaders_stress= [KNL]
29232955
Set the number of locking read-acquisition kthreads.
29242956
Defaults to being automatically set based on the
@@ -2934,6 +2966,25 @@
29342966
Set time (s) between CPU-hotplug operations, or
29352967
zero to disable CPU-hotplug testing.
29362968

2969+
locktorture.rt_boost= [KNL]
2970+
Do periodic testing of real-time lock priority
2971+
boosting. Select 0 to disable, 1 to boost
2972+
only rt_mutex, and 2 to boost unconditionally.
2973+
Defaults to 2, which might seem to be an
2974+
odd choice, but which should be harmless for
2975+
non-real-time spinlocks, due to their disabling
2976+
of preemption. Note that non-realtime mutexes
2977+
disable boosting.
2978+
2979+
locktorture.rt_boost_factor= [KNL]
2980+
Number that determines how often and for how
2981+
long priority boosting is exercised. This is
2982+
scaled down by the number of writers, so that the
2983+
number of boosts per unit time remains roughly
2984+
constant as the number of writers increases.
2985+
On the other hand, the duration of each boost
2986+
increases with the number of writers.
2987+
29372988
locktorture.shuffle_interval= [KNL]
29382989
Set task-shuffle interval (jiffies). Shuffling
29392990
tasks allows some CPUs to go into dyntick-idle
@@ -2956,13 +3007,13 @@
29563007
locktorture.torture_type= [KNL]
29573008
Specify the locking implementation to test.
29583009

3010+
locktorture.verbose= [KNL]
3011+
Enable additional printk() statements.
3012+
29593013
locktorture.writer_fifo= [KNL]
29603014
Run the write-side locktorture kthreads at
29613015
sched_set_fifo() real-time priority.
29623016

2963-
locktorture.verbose= [KNL]
2964-
Enable additional printk() statements.
2965-
29663017
logibm.irq= [HW,MOUSE] Logitech Bus Mouse Driver
29673018
Format: <irq>
29683019

@@ -4775,6 +4826,13 @@
47754826
Set maximum number of finished RCU callbacks to
47764827
process in one batch.
47774828

4829+
rcutree.do_rcu_barrier= [KNL]
4830+
Request a call to rcu_barrier(). This is
4831+
throttled so that userspace tests can safely
4832+
hammer on the sysfs variable if they so choose.
4833+
If triggered before the RCU grace-period machinery
4834+
is fully active, this will error out with EAGAIN.
4835+
47784836
rcutree.dump_tree= [KNL]
47794837
Dump the structure of the rcu_node combining tree
47804838
out at early boot. This is used for diagnostic
@@ -5428,6 +5486,12 @@
54285486
test until boot completes in order to avoid
54295487
interference.
54305488

5489+
refscale.lookup_instances= [KNL]
5490+
Number of data elements to use for the forms of
5491+
SLAB_TYPESAFE_BY_RCU testing. A negative number
5492+
is negated and multiplied by nr_cpu_ids, while
5493+
zero specifies nr_cpu_ids.
5494+
54315495
refscale.loops= [KNL]
54325496
Set the number of loops over the synchronization
54335497
primitive under test. Increasing this number

arch/arm64/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ asmlinkage notrace void secondary_start_kernel(void)
215215
if (system_uses_irq_prio_masking())
216216
init_gic_priority_masking();
217217

218-
rcu_cpu_starting(cpu);
218+
rcutree_report_cpu_starting(cpu);
219219
trace_hardirqs_off();
220220

221221
/*
@@ -401,7 +401,7 @@ void __noreturn cpu_die_early(void)
401401

402402
/* Mark this CPU absent */
403403
set_cpu_present(cpu, 0);
404-
rcu_report_dead(cpu);
404+
rcutree_report_cpu_dead();
405405

406406
if (IS_ENABLED(CONFIG_HOTPLUG_CPU)) {
407407
update_cpu_boot_status(CPU_KILL_ME);

0 commit comments

Comments
 (0)