<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/rcu/tree.c, branch v4.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.0</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.0'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-01-16T07:34:34Z</updated>
<entry>
<title>Merge branches 'doc.2015.01.07a', 'fixes.2015.01.15a', 'preempt.2015.01.06a', 'srcu.2015.01.06a', 'stall.2015.01.16a' and 'torture.2015.01.11a' into HEAD</title>
<updated>2015-01-16T07:34:34Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-01-16T07:34:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=78e691f4ae2d5edea0199ca802bb505b9cdced88'/>
<id>urn:sha1:78e691f4ae2d5edea0199ca802bb505b9cdced88</id>
<content type='text'>
doc.2015.01.07a: Documentation updates.
fixes.2015.01.15a: Miscellaneous fixes.
preempt.2015.01.06a: Changes to handling of lists of preempted tasks.
srcu.2015.01.06a: SRCU updates.
stall.2015.01.16a: RCU CPU stall-warning updates and fixes.
torture.2015.01.11a: RCU torture-test updates and fixes.
</content>
</entry>
<entry>
<title>rcu: Add GP-kthread-starvation checks to CPU stall warnings</title>
<updated>2015-01-16T07:33:15Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-12-17T16:35:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fb81a44b88e6173ed0f6e9d6a1afa5305fb63f6e'/>
<id>urn:sha1:fb81a44b88e6173ed0f6e9d6a1afa5305fb63f6e</id>
<content type='text'>
This commit adds a message that is printed if the relevant grace-period
kthread has not been able to run for the two seconds preceding the
stall warning.  (The two seconds is double the maximum interval between
successive bouts of quiescent-state forcing.)

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Make cond_resched_rcu_qs() apply to normal RCU flavors</title>
<updated>2015-01-16T07:33:14Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-12-14T04:32:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5cd37193ce8539be1e6ef76be226f4bcc984e0f5'/>
<id>urn:sha1:5cd37193ce8539be1e6ef76be226f4bcc984e0f5</id>
<content type='text'>
Although cond_resched_rcu_qs() only applies to TASKS_RCU, it is used
in places where it would be useful for it to apply to the normal RCU
flavors, rcu_preempt, rcu_sched, and rcu_bh.  This is especially the
case for workloads that aggressively overload the system, particularly
those that generate large numbers of RCU updates on systems running
NO_HZ_FULL CPUs.  This commit therefore communicates quiescent states
from cond_resched_rcu_qs() to the normal RCU flavors.

Note that it is unfortunately necessary to leave the old -&gt;passed_quiesce
mechanism in place to allow quiescent states that apply to only one
flavor to be recorded.  (Yes, we could decrement -&gt;rcu_qs_ctr_snap in
that case, but that is not so good for debugging of RCU internals.)
In addition, if one of the RCU flavor's grace period has stalled, this
will invoke rcu_momentary_dyntick_idle(), resulting in a heavy-weight
quiescent state visible from other CPUs.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Reported-by: Dave Jones &lt;davej@redhat.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
[ paulmck: Merge commit from Sasha Levin fixing a bug where __this_cpu()
  was used in preemptible code. ]
</content>
</entry>
<entry>
<title>rcu: Optionally run grace-period kthreads at real-time priority</title>
<updated>2015-01-16T07:25:04Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-12-12T15:37:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a94844b22a2e2b9155bbc0878c507850477221c2'/>
<id>urn:sha1:a94844b22a2e2b9155bbc0878c507850477221c2</id>
<content type='text'>
Recent testing has shown that under heavy load, running RCU's grace-period
kthreads at real-time priority can improve performance (according to 0day
test robot) and reduce the incidence of RCU CPU stall warnings.  However,
most systems do just fine with the default non-realtime priorities for
these kthreads, and it does not make sense to expose the entire user
base to any risk stemming from this change, given that this change is
of use only to a few users running extremely heavy workloads.

Therefore, this commit allows users to specify realtime priorities
for the grace-period kthreads, but leaves them running SCHED_OTHER
by default.  The realtime priority may be specified at build time
via the RCU_KTHREAD_PRIO Kconfig parameter, or at boot time via the
rcutree.kthread_prio parameter.  Either way, 0 says to continue the
default SCHED_OTHER behavior and values from 1-99 specify that priority
of SCHED_FIFO behavior.  Note that a value of 0 is not permitted when
the RCU_BOOST Kconfig parameter is specified.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcutorture: Check from beginning to end of grace period</title>
<updated>2015-01-11T03:08:02Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-11-22T01:10:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=917963d0b30f9c4153c372c165178501d97b6b55'/>
<id>urn:sha1:917963d0b30f9c4153c372c165178501d97b6b55</id>
<content type='text'>
Currently, rcutorture's Reader Batch checks measure from the end of
the previous grace period to the end of the current one.  This commit
tightens up these checks by measuring from the start and end of the same
grace period.  This involves adding rcu_batches_started() and friends
corresponding to the existing rcu_batches_completed() and friends.

We leave SRCU alone for the moment, as it does not yet have a way of
tracking both ends of its grace periods.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Make _batches_completed() functions return unsigned long</title>
<updated>2015-01-11T03:07:56Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-11-21T20:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=9733e4f0a973a354034f5dd603b4142a3095c85f'/>
<id>urn:sha1:9733e4f0a973a354034f5dd603b4142a3095c85f</id>
<content type='text'>
Long ago, the various -&gt;completed fields were of type long, but now are
unsigned long due to signed-integer-overflow concerns.  However, the
various _batches_completed() functions remained of type long, even though
their only purpose in life is to return the corresponding -&gt;completed
field.  This patch cleans this up by changing these functions' return
types to unsigned long.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Handle gpnum/completed wrap while dyntick idle</title>
<updated>2015-01-06T19:05:28Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-12-09T04:26:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e3663b1024d1f94688e5233440ad67a9bc10b94e'/>
<id>urn:sha1:e3663b1024d1f94688e5233440ad67a9bc10b94e</id>
<content type='text'>
Subtle race conditions can result if a CPU stays in dyntick-idle mode
long enough for the -&gt;gpnum and -&gt;completed fields to wrap.  For
example, consider the following sequence of events:

o	CPU 1 encounters a quiescent state while waiting for grace period
	5 to complete, but then enters dyntick-idle mode.

o	While CPU 1 is in dyntick-idle mode, the grace-period counters
	wrap around so that the grace period number is now 4.

o	Just as CPU 1 exits dyntick-idle mode, grace period 4 completes
	and grace period 5 begins.

o	The quiescent state that CPU 1 passed through during the old
	grace period 5 looks like it applies to the new grace period
	5.  Therefore, the new grace period 5 completes without CPU 1
	having passed through a quiescent state.

This could clearly be a fatal surprise to any long-running RCU read-side
critical section that happened to be running on CPU 1 at the time.  At one
time, this was not a problem, given that it takes significant time for
the grace-period counters to overflow even on 32-bit systems.  However,
with the advent of NO_HZ_FULL and SMP embedded systems, arbitrarily long
idle periods are now becoming quite feasible.  It is therefore time to
close this race.

This commit therefore avoids this race condition by having the
quiescent-state forcing code detect when a CPU is falling too far
behind, and setting a new rcu_data field -&gt;gpwrap when this happens.
Whenever this new -&gt;gpwrap field is set, the CPU's -&gt;gpnum and -&gt;completed
fields are known to be untrustworthy, and can be ignored, along with
any associated quiescent states.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Improve diagnostics for spurious RCU CPU stall warnings</title>
<updated>2015-01-06T19:05:27Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-12-11T18:20:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6ccd2ecd422644277b7d8b37222e3af3f43ea9ae'/>
<id>urn:sha1:6ccd2ecd422644277b7d8b37222e3af3f43ea9ae</id>
<content type='text'>
The current RCU CPU stall warning code will print "Stall ended before
state dump start" any time that the stall-warning code is triggered on
a CPU that has already reported a quiescent state for the current grace
period and if all quiescent states have been reported for the current
grace period.  However, a true stall can result in these symptoms, for
example, by preventing RCU's grace-period kthreads from ever running

This commit therefore checks for this condition, reporting the end of
the stall only if one of the grace-period counters has actually advanced.
Otherwise, it reports the last time that the grace-period kthread made
meaningful progress.  (In normal situations, the grace-period kthread
should make meaningful progress at least every jiffies_till_next_fqs
jiffies.)

Reported-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Tested-by: Miroslav Benes &lt;mbenes@suse.cz&gt;
</content>
</entry>
<entry>
<title>rcu: Make RCU_CPU_STALL_INFO include number of fqs attempts</title>
<updated>2015-01-06T19:05:25Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-12-08T17:57:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc908ed33e7c1428f799abb12399f906da03b397'/>
<id>urn:sha1:fc908ed33e7c1428f799abb12399f906da03b397</id>
<content type='text'>
One way that an RCU CPU stall warning can happen is if the grace-period
kthread is not allowed to execute.  One proxy for this kthread's
forward progress is the number of force-quiescent-state (fqs) scans.
This commit therefore adds the number of fqs scans to the RCU CPU stall
warning printouts when CONFIG_RCU_CPU_STALL_INFO=y.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Remove redundant callback-list initialization</title>
<updated>2015-01-06T19:02:54Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2014-12-18T02:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab954c167ed9ac107a8beb1d6e1745ae698a3421'/>
<id>urn:sha1:ab954c167ed9ac107a8beb1d6e1745ae698a3421</id>
<content type='text'>
The RCU callback lists are initialized in both rcu_boot_init_percpu_data()
and rcu_init_percpu_data().  The former is intended for initializing
immutable data, so this commit removes the initialization from
rcu_boot_init_percpu_data() and leaves it in rcu_init_percpu_data().
This change prepares for permitting callbacks to be queued very early
in boot.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
</feed>
