<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/rcu/tree.c, branch v4.8</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.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-15T08:41:44Z</updated>
<entry>
<title>rcu: Convert rcutree to hotplug state machine</title>
<updated>2016-07-15T08:41:44Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2016-07-13T17:17:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4df8374254ea9294dfe4b8c447a1b7eddc543dbf'/>
<id>urn:sha1:4df8374254ea9294dfe4b8c447a1b7eddc543dbf</id>
<content type='text'>
Straight forward conversion to the state machine. Though the question arises
whether this needs really all these state transitions to work.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Anna-Maria Gleixner &lt;anna-maria@linutronix.de&gt;
Reviewed-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Cc: rt@linutronix.de
Link: http://lkml.kernel.org/r/20160713153337.982013161@linutronix.de
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Correctly handle sparse possible cpus</title>
<updated>2016-06-15T23:00:05Z</updated>
<author>
<name>Mark Rutland</name>
<email>mark.rutland@arm.com</email>
</author>
<published>2016-06-03T14:20:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc75e99983df1efd977a5cd468893d55d52b8d70'/>
<id>urn:sha1:bc75e99983df1efd977a5cd468893d55d52b8d70</id>
<content type='text'>
In many cases in the RCU tree code, we iterate over the set of cpus for
a leaf node described by rcu_node::grplo and rcu_node::grphi, checking
per-cpu data for each cpu in this range. However, if the set of possible
cpus is sparse, some cpus described in this range are not possible, and
thus no per-cpu region will have been allocated (or initialised) for
them by the generic percpu code.

Erroneous accesses to a per-cpu area for these !possible cpus may fault
or may hit other data depending on the addressed generated when the
erroneous per cpu offset is applied. In practice, both cases have been
observed on arm64 hardware (the former being silent, but detectable with
additional patches).

To avoid issues resulting from this, we must iterate over the set of
*possible* cpus for a given leaf node. This patch add a new helper,
for_each_leaf_node_possible_cpu, to enable this. As iteration is often
intertwined with rcu_node local bitmask manipulation, a new
leaf_node_cpu_bit helper is added to make this simpler and more
consistent. The RCU tree code is made to use both of these where
appropriate.

Without this patch, running reboot at a shell can result in an oops
like:

[ 3369.075979] Unable to handle kernel paging request at virtual address ffffff8008b21b4c
[ 3369.083881] pgd = ffffffc3ecdda000
[ 3369.087270] [ffffff8008b21b4c] *pgd=00000083eca48003, *pud=00000083eca48003, *pmd=0000000000000000
[ 3369.096222] Internal error: Oops: 96000007 [#1] PREEMPT SMP
[ 3369.101781] Modules linked in:
[ 3369.104825] CPU: 2 PID: 1817 Comm: NetworkManager Tainted: G        W       4.6.0+ #3
[ 3369.121239] task: ffffffc0fa13e000 ti: ffffffc3eb940000 task.ti: ffffffc3eb940000
[ 3369.128708] PC is at sync_rcu_exp_select_cpus+0x188/0x510
[ 3369.134094] LR is at sync_rcu_exp_select_cpus+0x104/0x510
[ 3369.139479] pc : [&lt;ffffff80081109a8&gt;] lr : [&lt;ffffff8008110924&gt;] pstate: 200001c5
[ 3369.146860] sp : ffffffc3eb9435a0
[ 3369.150162] x29: ffffffc3eb9435a0 x28: ffffff8008be4f88
[ 3369.155465] x27: ffffff8008b66c80 x26: ffffffc3eceb2600
[ 3369.160767] x25: 0000000000000001 x24: ffffff8008be4f88
[ 3369.166070] x23: ffffff8008b51c3c x22: ffffff8008b66c80
[ 3369.171371] x21: 0000000000000001 x20: ffffff8008b21b40
[ 3369.176673] x19: ffffff8008b66c80 x18: 0000000000000000
[ 3369.181975] x17: 0000007fa951a010 x16: ffffff80086a30f0
[ 3369.187278] x15: 0000007fa9505590 x14: 0000000000000000
[ 3369.192580] x13: ffffff8008b51000 x12: ffffffc3eb940000
[ 3369.197882] x11: 0000000000000006 x10: ffffff8008b51b78
[ 3369.203184] x9 : 0000000000000001 x8 : ffffff8008be4000
[ 3369.208486] x7 : ffffff8008b21b40 x6 : 0000000000001003
[ 3369.213788] x5 : 0000000000000000 x4 : ffffff8008b27280
[ 3369.219090] x3 : ffffff8008b21b4c x2 : 0000000000000001
[ 3369.224406] x1 : 0000000000000001 x0 : 0000000000000140
...
[ 3369.972257] [&lt;ffffff80081109a8&gt;] sync_rcu_exp_select_cpus+0x188/0x510
[ 3369.978685] [&lt;ffffff80081128b4&gt;] synchronize_rcu_expedited+0x64/0xa8
[ 3369.985026] [&lt;ffffff80086b987c&gt;] synchronize_net+0x24/0x30
[ 3369.990499] [&lt;ffffff80086ddb54&gt;] dev_deactivate_many+0x28c/0x298
[ 3369.996493] [&lt;ffffff80086b6bb8&gt;] __dev_close_many+0x60/0xd0
[ 3370.002052] [&lt;ffffff80086b6d48&gt;] __dev_close+0x28/0x40
[ 3370.007178] [&lt;ffffff80086bf62c&gt;] __dev_change_flags+0x8c/0x158
[ 3370.012999] [&lt;ffffff80086bf718&gt;] dev_change_flags+0x20/0x60
[ 3370.018558] [&lt;ffffff80086cf7f0&gt;] do_setlink+0x288/0x918
[ 3370.023771] [&lt;ffffff80086d0798&gt;] rtnl_newlink+0x398/0x6a8
[ 3370.029158] [&lt;ffffff80086cee84&gt;] rtnetlink_rcv_msg+0xe4/0x220
[ 3370.034891] [&lt;ffffff80086e274c&gt;] netlink_rcv_skb+0xc4/0xf8
[ 3370.040364] [&lt;ffffff80086ced8c&gt;] rtnetlink_rcv+0x2c/0x40
[ 3370.045663] [&lt;ffffff80086e1fe8&gt;] netlink_unicast+0x160/0x238
[ 3370.051309] [&lt;ffffff80086e24b8&gt;] netlink_sendmsg+0x2f0/0x358
[ 3370.056956] [&lt;ffffff80086a0070&gt;] sock_sendmsg+0x18/0x30
[ 3370.062168] [&lt;ffffff80086a21cc&gt;] ___sys_sendmsg+0x26c/0x280
[ 3370.067728] [&lt;ffffff80086a30ac&gt;] __sys_sendmsg+0x44/0x88
[ 3370.073027] [&lt;ffffff80086a3100&gt;] SyS_sendmsg+0x10/0x20
[ 3370.078153] [&lt;ffffff8008085e70&gt;] el0_svc_naked+0x24/0x28

Signed-off-by: Mark Rutland &lt;mark.rutland@arm.com&gt;
Reported-by: Dennis Chen &lt;dennis.chen@arm.com&gt;
Cc: Catalin Marinas &lt;catalin.marinas@arm.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Lai Jiangshan &lt;jiangshanlai@gmail.com&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Steve Capper &lt;steve.capper@arm.com&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Will Deacon &lt;will.deacon@arm.com&gt;
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: sysctl: Panic on RCU Stall</title>
<updated>2016-06-15T23:00:05Z</updated>
<author>
<name>Daniel Bristot de Oliveira</name>
<email>bristot@redhat.com</email>
</author>
<published>2016-06-02T16:51:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=088e9d253d3a4ab7e058dd84bb532c32dadf1882'/>
<id>urn:sha1:088e9d253d3a4ab7e058dd84bb532c32dadf1882</id>
<content type='text'>
It is not always easy to determine the cause of an RCU stall just by
analysing the RCU stall messages, mainly when the problem is caused
by the indirect starvation of rcu threads. For example, when preempt_rcu
is not awakened due to the starvation of a timer softirq.

We have been hard coding panic() in the RCU stall functions for
some time while testing the kernel-rt. But this is not possible in
some scenarios, like when supporting customers.

This patch implements the sysctl kernel.panic_on_rcu_stall. If
set to 1, the system will panic() when an RCU stall takes place,
enabling the capture of a vmcore. The vmcore provides a way to analyze
all kernel/tasks states, helping out to point to the culprit and the
solution for the stall.

The kernel.panic_on_rcu_stall sysctl is disabled by default.

Changes from v1:
- Fixed a typo in the git log
- The if(sysctl_panic_on_rcu_stall) panic() is in a static function
- Fixed the CONFIG_TINY_RCU compilation issue
- The var sysctl_panic_on_rcu_stall is now __read_mostly

Cc: Jonathan Corbet &lt;corbet@lwn.net&gt;
Cc: "Paul E. McKenney" &lt;paulmck@linux.vnet.ibm.com&gt;
Cc: Josh Triplett &lt;josh@joshtriplett.org&gt;
Cc: Steven Rostedt &lt;rostedt@goodmis.org&gt;
Cc: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Lai Jiangshan &lt;jiangshanlai@gmail.com&gt;
Acked-by: Christian Borntraeger &lt;borntraeger@de.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
Reviewed-by: Arnaldo Carvalho de Melo &lt;acme@kernel.org&gt;
Tested-by: "Luis Claudio R. Goncalves" &lt;lgoncalv@redhat.com&gt;
Signed-off-by: Daniel Bristot de Oliveira &lt;bristot@redhat.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Move expedited code from tree.c to tree_exp.h</title>
<updated>2016-06-14T23:01:41Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-04-15T23:35:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3549c2bc2c4ea8ecfeb9d21cb81cb00c6002b011'/>
<id>urn:sha1:3549c2bc2c4ea8ecfeb9d21cb81cb00c6002b011</id>
<content type='text'>
People have been having some difficulty finding their way around the
RCU code.  This commit therefore pulls some of the expedited grace-period
code from tree.c to a new tree_exp.h file.  This commit is strictly code
movement, with the exception of a forward declaration that was added
for the sync_sched_exp_online_cleanup() function.

A subsequent commit will move the remaining expedited grace-period code
from tree_plugin.h to tree_exp.h.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Remove some superfluous lines</title>
<updated>2016-06-14T23:01:41Z</updated>
<author>
<name>Peter Zijlstra</name>
<email>peterz@infradead.org</email>
</author>
<published>2016-03-10T08:49:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d3acab65f274800dd0901f0816f8bca9f2a8c8ec'/>
<id>urn:sha1:d3acab65f274800dd0901f0816f8bca9f2a8c8ec</id>
<content type='text'>
I think you'll find this condition is superfluous, as the whole function
is under #ifdef of that same.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Fix outdated hotplug-exclusion comment in rcu_gp_init()</title>
<updated>2016-06-14T23:01:40Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-04-10T15:23:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=590d1757b9d177e7fe3707963d0209d6eefbc746'/>
<id>urn:sha1:590d1757b9d177e7fe3707963d0209d6eefbc746</id>
<content type='text'>
In the past, RCU grace-period initialization excluded CPU-hotplug
operations, but this is no longer the case.  This commit therefore
removed an outdated comment in rcu_gp_init() claiming that these
are excluded.

Reported-by: Lihao Liang &lt;lihao.liang@gmail.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Fix outdated rcu_scheduler_active comment</title>
<updated>2016-06-14T23:01:39Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-04-08T12:00:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0d95092ccba1a30b74fa52ff94ec5415e63744a0'/>
<id>urn:sha1:0d95092ccba1a30b74fa52ff94ec5415e63744a0</id>
<content type='text'>
The comment header for rcu_scheduler_active states that it is used
to optimize synchronize_sched() at early boot.  This is incorrect.
The synchronize_sched() function instead checks the number of online
CPUs.  This commit therefore replaces the comment's synchronize_sched()
with synchronize_rcu(), which really does use rcu_scheduler_active for
this purpose.

Reported-by: Lihao Liang &lt;lihao.liang@gmail.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'doc.2016.04.19a', 'exp.2016.03.31d', 'fixes.2016.03.31d' and 'torture.2016.04.21a' into HEAD</title>
<updated>2016-04-21T20:48:20Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-04-21T20:48:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dcd36d01fb3f99d1d5df01714f6ccbe3fbbaf81f'/>
<id>urn:sha1:dcd36d01fb3f99d1d5df01714f6ccbe3fbbaf81f</id>
<content type='text'>
doc.2016.04.19a: Documentation updates
exp.2016.03.31d: Expedited grace-period updates
fixes.2016.03.31d: Miscellaneous fixes
torture.2016.004.21a Torture-test updates
</content>
</entry>
<entry>
<title>rcutorture: Expedited-GP batch progress access to torturing</title>
<updated>2016-03-31T20:37:37Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-01-12T21:43:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=291783b8ad77a83a6fdf91d55eee7f1ad72ed4d1'/>
<id>urn:sha1:291783b8ad77a83a6fdf91d55eee7f1ad72ed4d1</id>
<content type='text'>
This commit provides rcu_exp_batches_completed() and
rcu_exp_batches_completed_sched() functions to allow torture-test modules
to check how many expedited grace period batches have completed.
These are analogous to the existing rcu_batches_completed(),
rcu_batches_completed_bh(), and rcu_batches_completed_sched() functions.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Dump ftrace buffer when kicking grace-period kthread</title>
<updated>2016-03-31T20:36:37Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2016-02-17T19:54:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5dffed1e5721f6deae4fd67d32386ef037c5fc56'/>
<id>urn:sha1:5dffed1e5721f6deae4fd67d32386ef037c5fc56</id>
<content type='text'>
If it is necessary to kick the grace-period kthread, that is a good
time to dump the trace buffer in order to learn why kicking was needed.
This commit therefore does the dump.

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