Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 567b64aa authored by Ingo Molnar's avatar Ingo Molnar
Browse files

Merge branch 'for-mingo' of...

Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu

 into core/rcu

Pull RCU updates from Paul E. McKenney:

 "The largest feature of this series is shrinking and simplification,
  with the following diffstat summary:

     79 files changed, 1496 insertions(+), 4211 deletions(-)

  In other words, this series represents a net reduction of more than 2700
  lines of code."

Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
parents 32c1431e 6d48152e
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -28,8 +28,6 @@ stallwarn.txt
	- RCU CPU stall warnings (module parameter rcu_cpu_stall_suppress)
	- RCU CPU stall warnings (module parameter rcu_cpu_stall_suppress)
torture.txt
torture.txt
	- RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
	- RCU Torture Test Operation (CONFIG_RCU_TORTURE_TEST)
trace.txt
	- CONFIG_RCU_TRACE debugfs files and formats
UP.txt
UP.txt
	- RCU on Uniprocessor Systems
	- RCU on Uniprocessor Systems
whatisRCU.txt
whatisRCU.txt
+21 −13
Original line number Original line Diff line number Diff line
@@ -559,9 +559,7 @@ The <tt>rcu_access_pointer()</tt> on line&nbsp;6 is similar to
	For <tt>remove_gp_synchronous()</tt>, as long as all modifications
	For <tt>remove_gp_synchronous()</tt>, as long as all modifications
	to <tt>gp</tt> are carried out while holding <tt>gp_lock</tt>,
	to <tt>gp</tt> are carried out while holding <tt>gp_lock</tt>,
	the above optimizations are harmless.
	the above optimizations are harmless.
	However,
	However, <tt>sparse</tt> will complain if you
	with <tt>CONFIG_SPARSE_RCU_POINTER=y</tt>,
	<tt>sparse</tt> will complain if you
	define <tt>gp</tt> with <tt>__rcu</tt> and then
	define <tt>gp</tt> with <tt>__rcu</tt> and then
	access it without using
	access it without using
	either <tt>rcu_access_pointer()</tt> or <tt>rcu_dereference()</tt>.
	either <tt>rcu_access_pointer()</tt> or <tt>rcu_dereference()</tt>.
@@ -1849,7 +1847,8 @@ mass storage, or user patience, whichever comes first.
If the nesting is not visible to the compiler, as is the case with
If the nesting is not visible to the compiler, as is the case with
mutually recursive functions each in its own translation unit,
mutually recursive functions each in its own translation unit,
stack overflow will result.
stack overflow will result.
If the nesting takes the form of loops, either the control variable
If the nesting takes the form of loops, perhaps in the guise of tail
recursion, either the control variable
will overflow or (in the Linux kernel) you will get an RCU CPU stall warning.
will overflow or (in the Linux kernel) you will get an RCU CPU stall warning.
Nevertheless, this class of RCU implementations is one
Nevertheless, this class of RCU implementations is one
of the most composable constructs in existence.
of the most composable constructs in existence.
@@ -1977,9 +1976,8 @@ guard against mishaps and misuse:
	and <tt>rcu_dereference()</tt>, perhaps (incorrectly)
	and <tt>rcu_dereference()</tt>, perhaps (incorrectly)
	substituting a simple assignment.
	substituting a simple assignment.
	To catch this sort of error, a given RCU-protected pointer may be
	To catch this sort of error, a given RCU-protected pointer may be
	tagged with <tt>__rcu</tt>, after which running sparse
	tagged with <tt>__rcu</tt>, after which sparse
	with <tt>CONFIG_SPARSE_RCU_POINTER=y</tt> will complain
	will complain about simple-assignment accesses to that pointer.
	about simple-assignment accesses to that pointer.
	Arnd Bergmann made me aware of this requirement, and also
	Arnd Bergmann made me aware of this requirement, and also
	supplied the needed
	supplied the needed
	<a href="https://lwn.net/Articles/376011/">patch series</a>.
	<a href="https://lwn.net/Articles/376011/">patch series</a>.
@@ -2036,7 +2034,7 @@ guard against mishaps and misuse:
	some other synchronization mechanism, for example, reference
	some other synchronization mechanism, for example, reference
	counting.
	counting.
<li>	In kernels built with <tt>CONFIG_RCU_TRACE=y</tt>, RCU-related
<li>	In kernels built with <tt>CONFIG_RCU_TRACE=y</tt>, RCU-related
	information is provided via both debugfs and event tracing.
	information is provided via event tracing.
<li>	Open-coded use of <tt>rcu_assign_pointer()</tt> and
<li>	Open-coded use of <tt>rcu_assign_pointer()</tt> and
	<tt>rcu_dereference()</tt> to create typical linked
	<tt>rcu_dereference()</tt> to create typical linked
	data structures can be surprisingly error-prone.
	data structures can be surprisingly error-prone.
@@ -2519,11 +2517,7 @@ It is similarly socially unacceptable to interrupt an
<tt>nohz_full</tt> CPU running in userspace.
<tt>nohz_full</tt> CPU running in userspace.
RCU must therefore track <tt>nohz_full</tt> userspace
RCU must therefore track <tt>nohz_full</tt> userspace
execution.
execution.
And in
RCU must therefore be able to sample state at two points in
<a href="https://lwn.net/Articles/558284/"><tt>CONFIG_NO_HZ_FULL_SYSIDLE=y</tt></a>
kernels, RCU must separately track idle CPUs on the one hand and
CPUs that are either idle or executing in userspace on the other.
In both cases, RCU must be able to sample state at two points in
time, and be able to determine whether or not some other CPU spent
time, and be able to determine whether or not some other CPU spent
any time idle and/or executing in userspace.
any time idle and/or executing in userspace.


@@ -2935,6 +2929,20 @@ The reason that this is possible is that SRCU is insensitive
to whether or not a CPU is online, which means that <tt>srcu_barrier()</tt>
to whether or not a CPU is online, which means that <tt>srcu_barrier()</tt>
need not exclude CPU-hotplug operations.
need not exclude CPU-hotplug operations.


<p>
SRCU also differs from other RCU flavors in that SRCU's expedited and
non-expedited grace periods are implemented by the same mechanism.
This means that in the current SRCU implementation, expediting a
future grace period has the side effect of expediting all prior
grace periods that have not yet completed.
(But please note that this is a property of the current implementation,
not necessarily of future implementations.)
In addition, if SRCU has been idle for longer than the interval
specified by the <tt>srcutree.exp_holdoff</tt> kernel boot parameter
(25&nbsp;microseconds by default),
and if a <tt>synchronize_srcu()</tt> invocation ends this idle period,
that invocation will be automatically expedited.

<p>
<p>
As of v4.12, SRCU's callbacks are maintained per-CPU, eliminating
As of v4.12, SRCU's callbacks are maintained per-CPU, eliminating
a locking bottleneck present in prior kernel versions.
a locking bottleneck present in prior kernel versions.
+4 −4
Original line number Original line Diff line number Diff line
@@ -413,11 +413,11 @@ over a rather long period of time, but improvements are always welcome!
	read-side critical sections.  It is the responsibility of the
	read-side critical sections.  It is the responsibility of the
	RCU update-side primitives to deal with this.
	RCU update-side primitives to deal with this.


17.	Use CONFIG_PROVE_RCU, CONFIG_DEBUG_OBJECTS_RCU_HEAD, and the
17.	Use CONFIG_PROVE_LOCKING, CONFIG_DEBUG_OBJECTS_RCU_HEAD, and the
	__rcu sparse checks (enabled by CONFIG_SPARSE_RCU_POINTER) to
	__rcu sparse checks to validate your RCU code.	These can help
	validate your RCU code.  These can help find problems as follows:
	find problems as follows:


	CONFIG_PROVE_RCU: check that accesses to RCU-protected data
	CONFIG_PROVE_LOCKING: check that accesses to RCU-protected data
		structures are carried out under the proper RCU
		structures are carried out under the proper RCU
		read-side critical section, while holding the right
		read-side critical section, while holding the right
		combination of locks, or whatever other conditions
		combination of locks, or whatever other conditions

Documentation/RCU/trace.txt

deleted100644 → 0
+0 −535

File deleted.

Preview size limit exceeded, changes collapsed.

+31 −10
Original line number Original line Diff line number Diff line
@@ -3238,21 +3238,17 @@


	rcutree.gp_cleanup_delay=	[KNL]
	rcutree.gp_cleanup_delay=	[KNL]
			Set the number of jiffies to delay each step of
			Set the number of jiffies to delay each step of
			RCU grace-period cleanup.  This only has effect
			RCU grace-period cleanup.
			when CONFIG_RCU_TORTURE_TEST_SLOW_CLEANUP is set.


	rcutree.gp_init_delay=	[KNL]
	rcutree.gp_init_delay=	[KNL]
			Set the number of jiffies to delay each step of
			Set the number of jiffies to delay each step of
			RCU grace-period initialization.  This only has
			RCU grace-period initialization.
			effect when CONFIG_RCU_TORTURE_TEST_SLOW_INIT
			is set.


	rcutree.gp_preinit_delay=	[KNL]
	rcutree.gp_preinit_delay=	[KNL]
			Set the number of jiffies to delay each step of
			Set the number of jiffies to delay each step of
			RCU grace-period pre-initialization, that is,
			RCU grace-period pre-initialization, that is,
			the propagation of recent CPU-hotplug changes up
			the propagation of recent CPU-hotplug changes up
			the rcu_node combining tree.  This only has effect
			the rcu_node combining tree.
			when CONFIG_RCU_TORTURE_TEST_SLOW_PREINIT is set.


	rcutree.rcu_fanout_exact= [KNL]
	rcutree.rcu_fanout_exact= [KNL]
			Disable autobalancing of the rcu_node combining
			Disable autobalancing of the rcu_node combining
@@ -3328,6 +3324,17 @@
			This wake_up() will be accompanied by a
			This wake_up() will be accompanied by a
			WARN_ONCE() splat and an ftrace_dump().
			WARN_ONCE() splat and an ftrace_dump().


	rcuperf.gp_async= [KNL]
			Measure performance of asynchronous
			grace-period primitives such as call_rcu().

	rcuperf.gp_async_max= [KNL]
			Specify the maximum number of outstanding
			callbacks per writer thread.  When a writer
			thread exceeds this limit, it invokes the
			corresponding flavor of rcu_barrier() to allow
			previously posted callbacks to drain.

	rcuperf.gp_exp= [KNL]
	rcuperf.gp_exp= [KNL]
			Measure performance of expedited synchronous
			Measure performance of expedited synchronous
			grace-period primitives.
			grace-period primitives.
@@ -3355,17 +3362,22 @@
	rcuperf.perf_runnable= [BOOT]
	rcuperf.perf_runnable= [BOOT]
			Start rcuperf running at boot time.
			Start rcuperf running at boot time.


	rcuperf.perf_type= [KNL]
			Specify the RCU implementation to test.

	rcuperf.shutdown= [KNL]
	rcuperf.shutdown= [KNL]
			Shut the system down after performance tests
			Shut the system down after performance tests
			complete.  This is useful for hands-off automated
			complete.  This is useful for hands-off automated
			testing.
			testing.


	rcuperf.perf_type= [KNL]
			Specify the RCU implementation to test.

	rcuperf.verbose= [KNL]
	rcuperf.verbose= [KNL]
			Enable additional printk() statements.
			Enable additional printk() statements.


	rcuperf.writer_holdoff= [KNL]
			Write-side holdoff between grace periods,
			in microseconds.  The default of zero says
			no holdoff.

	rcutorture.cbflood_inter_holdoff= [KNL]
	rcutorture.cbflood_inter_holdoff= [KNL]
			Set holdoff time (jiffies) between successive
			Set holdoff time (jiffies) between successive
			callback-flood tests.
			callback-flood tests.
@@ -3803,6 +3815,15 @@
	spia_pedr=
	spia_pedr=
	spia_peddr=
	spia_peddr=


	srcutree.counter_wrap_check [KNL]
			Specifies how frequently to check for
			grace-period sequence counter wrap for the
			srcu_data structure's ->srcu_gp_seq_needed field.
			The greater the number of bits set in this kernel
			parameter, the less frequently counter wrap will
			be checked for.  Note that the bottom two bits
			are ignored.

	srcutree.exp_holdoff [KNL]
	srcutree.exp_holdoff [KNL]
			Specifies how many nanoseconds must elapse
			Specifies how many nanoseconds must elapse
			since the end of the last SRCU grace period for
			since the end of the last SRCU grace period for
Loading