<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/rcu/tree.c, branch v4.3</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.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-09-21T04:01:22Z</updated>
<entry>
<title>rcu: Suppress lockdep false positive for rcp-&gt;exp_funnel_mutex</title>
<updated>2015-09-21T04:01:22Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-09-21T04:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19a5ecde086a6a5287978b12ae948fa691b197b7'/>
<id>urn:sha1:19a5ecde086a6a5287978b12ae948fa691b197b7</id>
<content type='text'>
In kernels built with CONFIG_PREEMPT=y, synchronize_rcu_expedited()
invokes synchronize_sched_expedited() while holding RCU-preempt's
root rcu_node structure's -&gt;exp_funnel_mutex, which is acquired after
the rcu_data structure's -&gt;exp_funnel_mutex.  The first thing that
synchronize_sched_expedited() will do is acquire RCU-sched's rcu_data
structure's -&gt;exp_funnel_mutex.   There is no danger of an actual deadlock
because the locking order is always from RCU-preempt's expedited mutexes
to those of RCU-sched.  Unfortunately, lockdep considers both rcu_data
structures' -&gt;exp_funnel_mutex to be in the same lock class and therefore
reports a deadlock cycle.

This commit silences this false positive by placing RCU-sched's rcu_data
structures' -&gt;exp_funnel_mutex locks into their own lock class.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>Merge branches 'fixes.2015.07.22a' and 'initexp.2015.08.04a' into HEAD</title>
<updated>2015-08-04T15:40:58Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-08-04T15:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ff4fbfd69a6c7b9598f8c1f2df34f89bac02c1a'/>
<id>urn:sha1:8ff4fbfd69a6c7b9598f8c1f2df34f89bac02c1a</id>
<content type='text'>
fixes.2015.07.22a: Miscellaneous fixes.
initexp.2015.08.04a: Initialization and expedited updates.
	(Single branch due to conflicts.)
</content>
</entry>
<entry>
<title>rcu: Silence lockdep false positive for expedited grace periods</title>
<updated>2015-08-04T15:39:21Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-07-19T22:13:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=af859beaaba4d57883b08f4acbcb3974bc1f975e'/>
<id>urn:sha1:af859beaaba4d57883b08f4acbcb3974bc1f975e</id>
<content type='text'>
In a CONFIG_PREEMPT=y kernel, synchronize_rcu_expedited()
acquires the -&gt;exp_funnel_mutex in rcu_preempt_state, then invokes
synchronize_sched_expedited, which acquires the -&gt;exp_funnel_mutex in
rcu_sched_state.  There can be no deadlock because rcu_preempt_state
-&gt;exp_funnel_mutex acquisition always precedes that of rcu_sched_state.
But lockdep does not know that, so it gives false-positive splats.

This commit therefore associates a separate lock_class_key structure
with the rcu_sched_state structure's -&gt;exp_funnel_mutex, allowing
lockdep to see the lock ordering, avoiding the false positives.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()</title>
<updated>2015-07-22T22:27:32Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-06-18T22:50:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f78f5b90c4ffa559e400c3919a02236101f29f3f'/>
<id>urn:sha1:f78f5b90c4ffa559e400c3919a02236101f29f3f</id>
<content type='text'>
This commit renames rcu_lockdep_assert() to RCU_LOCKDEP_WARN() for
consistency with the WARN() series of macros.  This also requires
inverting the sense of the conditional, which this commit also does.

Reported-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Make rcu_is_watching() really notrace</title>
<updated>2015-07-22T22:27:31Z</updated>
<author>
<name>Alexei Starovoitov</name>
<email>ast@plumgrid.com</email>
</author>
<published>2015-06-16T17:35:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=46f00d18fca42cc954c2e9e99a48b6f3a7741ed7'/>
<id>urn:sha1:46f00d18fca42cc954c2e9e99a48b6f3a7741ed7</id>
<content type='text'>
Although rcu_is_watching() is marked notrace, it invokes preempt_disable()
and preempt_enable(), both of which can be traced.  This defeats the
purpose of the notrace on rcu_is_watching(), so this commit substitutes
preempt_disable_notrace() and preempt_enable_notrace().

Signed-off-by: Alexei Starovoitov &lt;ast@plumgrid.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>rcu: Add RCU-sched flavors of get-state and cond-sync</title>
<updated>2015-07-22T22:26:58Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-05-30T17:11:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=24560056de61d86153cecb84d04e4237437f5888'/>
<id>urn:sha1:24560056de61d86153cecb84d04e4237437f5888</id>
<content type='text'>
The get_state_synchronize_rcu() and cond_synchronize_rcu() functions
allow polling for grace-period completion, with an actual wait for a
grace period occurring only when cond_synchronize_rcu() is called too
soon after the corresponding get_state_synchronize_rcu().  However,
these functions work only for vanilla RCU.  This commit adds the
get_state_synchronize_sched() and cond_synchronize_sched(), which provide
the same capability for RCU-sched.

Reported-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: Add fastpath bypassing funnel locking</title>
<updated>2015-07-17T21:59:06Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-07-11T23:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cdacbe1f91264687af956e810278030f2ab5a3d0'/>
<id>urn:sha1:cdacbe1f91264687af956e810278030f2ab5a3d0</id>
<content type='text'>
In the common case, there will be only one expedited grace period in
the system at a given time, in which case it is not helpful to use
funnel locking.  This commit therefore adds a fastpath that bypasses
funnel locking when the root -&gt;exp_funnel_mutex is not held.

Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Rename RCU_GP_DONE_FQS to RCU_GP_DOING_FQS</title>
<updated>2015-07-17T21:59:05Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-07-02T19:27:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=32bb1c79996069ef9e4e53b428050749f9841c3f'/>
<id>urn:sha1:32bb1c79996069ef9e4e53b428050749f9841c3f</id>
<content type='text'>
The grace-period kthread sleeps waiting to do a force-quiescent-state
scan, and when awakened sets rsp-&gt;gp_state to RCU_GP_DONE_FQS.
However, this is confusing because the kthread has not done the
force-quiescent-state, but is instead just starting to do it.  This commit
therefore renames RCU_GP_DONE_FQS to RCU_GP_DOING_FQS in order to make
things a bit easier on reviewers.

Reported-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Pull out wait_event*() condition into helper function</title>
<updated>2015-07-17T21:59:04Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-07-01T20:50:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b9a425cfcb3c473b4ca2f3dfaeaf13848f4a7976'/>
<id>urn:sha1:b9a425cfcb3c473b4ca2f3dfaeaf13848f4a7976</id>
<content type='text'>
The condition for the wait_event_interruptible_timeout() that waits
to do the next force-quiescent-state scan is a bit ornate:

	((gf = READ_ONCE(rsp-&gt;gp_flags)) &amp;
	 RCU_GP_FLAG_FQS) ||
	(!READ_ONCE(rnp-&gt;qsmask) &amp;&amp;
	 !rcu_preempt_blocked_readers_cgp(rnp))

This commit therefore pulls this condition out into a helper function
and comments its component conditions.

Reported-by: Peter Zijlstra &lt;peterz@infradead.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Add stall warnings to synchronize_sched_expedited()</title>
<updated>2015-07-17T21:59:01Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2015-06-30T18:14:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cf3620a6c7798be3395163d3bb863ab378a6aa80'/>
<id>urn:sha1:cf3620a6c7798be3395163d3bb863ab378a6aa80</id>
<content type='text'>
Although synchronize_sched_expedited() historically has no RCU CPU stall
warnings, the availability of the rcupdate.rcu_expedited boot parameter
invalidates the old assumption that synchronize_sched()'s stall warnings
would suffice.  This commit therefore adds RCU CPU stall warnings to
synchronize_sched_expedited().

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