<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/kernel/rcutree.h, branch v3.9</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=v3.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-01-29T06:25:21Z</updated>
<entry>
<title>Merge branches 'doctorture.2013.01.29a', 'fixes.2013.01.26a', 'tagcb.2013.01.24a' and 'tiny.2013.01.29b' into HEAD</title>
<updated>2013-01-29T06:25:21Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2013-01-29T06:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40393f525fe698e2b639cf1851ef0a40e7e158a8'/>
<id>urn:sha1:40393f525fe698e2b639cf1851ef0a40e7e158a8</id>
<content type='text'>
doctorture.2013.01.11a: Changes to rcutorture and to RCU documentation.

fixes.2013.01.26a: Miscellaneous fixes.

tagcb.2013.01.24a: Tag RCU callbacks with grace-period number to
	simplify callback advancement.

tiny.2013.01.29b: Enhancements to uniprocessor handling in tiny RCU.
</content>
</entry>
<entry>
<title>rcu: Provide RCU CPU stall warnings for tiny RCU</title>
<updated>2013-01-29T06:06:21Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paul.mckenney@linaro.org</email>
</author>
<published>2012-10-19T19:49:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6bfc09e2327dfbffc312004c16188dbf8dfb0297'/>
<id>urn:sha1:6bfc09e2327dfbffc312004c16188dbf8dfb0297</id>
<content type='text'>
Tiny RCU has historically omitted RCU CPU stall warnings in order to
reduce memory requirements, however, lack of these warnings caused
Thomas Gleixner some debugging pain recently.  Therefore, this commit
adds RCU CPU stall warnings to tiny RCU if RCU_TRACE=y.  This keeps
the memory footprint small, while still enabling CPU stall warnings
in kernels built to enable them.

Updated to include Josh Triplett's suggested use of RCU_STALL_COMMON
config variable to simplify #if expressions.

Reported-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Paul E. McKenney &lt;paul.mckenney@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Reviewed-by: Josh Triplett &lt;josh@joshtriplett.org&gt;
</content>
</entry>
<entry>
<title>rcu: Remove unused code originally used for context tracking</title>
<updated>2013-01-27T00:34:48Z</updated>
<author>
<name>Li Zhong</name>
<email>zhong@linux.vnet.ibm.com</email>
</author>
<published>2013-01-07T17:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=347f42382184f7448fa96bf9e9fa4eb6f6d1099e'/>
<id>urn:sha1:347f42382184f7448fa96bf9e9fa4eb6f6d1099e</id>
<content type='text'>
As context tracking subsystem evolved, it stopped using ignore_user_qs
and in_user defined in the rcu_dynticks structure.  This commit therefore
removes them.

Signed-off-by: Li Zhong &lt;zhong@linux.vnet.ibm.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Acked-by: Frederic Weisbecker &lt;fweisbec@gmail.com&gt;
</content>
</entry>
<entry>
<title>rcu: Tag callback lists with corresponding grace-period number</title>
<updated>2013-01-08T22:15:57Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2012-12-03T21:52:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dc35c8934eba959b690921615fcd987e8bc17e4a'/>
<id>urn:sha1:dc35c8934eba959b690921615fcd987e8bc17e4a</id>
<content type='text'>
Currently, callbacks are advanced each time the corresponding CPU
notices a change in its leaf rcu_node structure's -&gt;completed value
(this value counts grace-period completions).  This approach has worked
quite well, but with the advent of RCU_FAST_NO_HZ, we cannot count on
a given CPU seeing all the grace-period completions.  When a CPU misses
a grace-period completion that occurs while it is in dyntick-idle mode,
this will delay invocation of its callbacks.

In addition, acceleration of callbacks (when RCU realizes that a given
callback need only wait until the end of the next grace period, rather
than having to wait for a partial grace period followed by a full
grace period) must be carried out extremely carefully.  Insufficient
acceleration will result in unnecessarily long grace-period latencies,
while excessive acceleration will result in premature callback invocation.
Changes that involve this tradeoff are therefore among the most
nerve-wracking changes to RCU.

This commit therefore explicitly tags groups of callbacks with the
number of the grace period that they are waiting for.  This means that
callback-advancement and callback-acceleration functions are idempotent,
so that excessive acceleration will merely waste a few CPU cycles.  This
also allows a CPU to take full advantage of any grace periods that have
elapsed while it has been in dyntick-idle mode.  It should also enable
simulataneous simplifications to and optimizations of RCU_FAST_NO_HZ.

Signed-off-by: Paul E. McKenney &lt;paul.mckenney@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Separate accounting of callbacks from callback-free CPUs</title>
<updated>2012-11-16T18:05:57Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paul.mckenney@linaro.org</email>
</author>
<published>2012-10-29T14:29:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c635a4e1c24e9396db10ed7424b2084908b32252'/>
<id>urn:sha1:c635a4e1c24e9396db10ed7424b2084908b32252</id>
<content type='text'>
Currently, callback invocations from callback-free CPUs are accounted to
the CPU that registered the callback, but using the same field that is
used for normal callbacks.  This makes it impossible to determine from
debugfs output whether callbacks are in fact being diverted.  This commit
therefore adds a separate -&gt;n_nocbs_invoked field in the rcu_data structure
in which diverted callback invocations are counted.  RCU's debugfs tracing
still displays normal callback invocations using ci=, but displayed
diverted callbacks with nci=.

Signed-off-by: Paul E. McKenney &lt;paul.mckenney@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Add callback-free CPUs</title>
<updated>2012-11-16T18:05:56Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paul.mckenney@linaro.org</email>
</author>
<published>2012-08-20T04:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3fbfbf7a3b66ec424042d909f14ba2ddf4372ea8'/>
<id>urn:sha1:3fbfbf7a3b66ec424042d909f14ba2ddf4372ea8</id>
<content type='text'>
RCU callback execution can add significant OS jitter and also can
degrade both scheduling latency and, in asymmetric multiprocessors,
energy efficiency.  This commit therefore adds the ability for selected
CPUs ("rcu_nocbs=" boot parameter) to have their callbacks offloaded
to kthreads.  If the "rcu_nocb_poll" boot parameter is also specified,
these kthreads will do polling, removing the need for the offloaded
CPUs to do wakeups.  At least one CPU must be doing normal callback
processing: currently CPU 0 cannot be selected as a no-CBs CPU.
In addition, attempts to offline the last normal-CBs CPU will fail.

This feature was inspired by Jim Houston's and Joe Korty's JRCU, and
this commit includes fixes to problems located by Fengguang Wu's
kbuild test robot.

[ paulmck: Added gfp.h include file as suggested by Fengguang Wu. ]

Signed-off-by: Paul E. McKenney &lt;paul.mckenney@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Instrument synchronize_rcu_expedited() for debugfs tracing</title>
<updated>2012-11-08T19:50:13Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paul.mckenney@linaro.org</email>
</author>
<published>2012-10-11T23:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a30489c5228fba6f16b4c740a0292879ef13371e'/>
<id>urn:sha1:a30489c5228fba6f16b4c740a0292879ef13371e</id>
<content type='text'>
This commit adds the counters to rcu_state and updates them in
synchronize_rcu_expedited() to provide the data needed for debugfs
tracing.

Signed-off-by: Paul E. McKenney &lt;paul.mckenney@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Move synchronize_sched_expedited() state to rcu_state</title>
<updated>2012-11-08T19:50:12Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paul.mckenney@linaro.org</email>
</author>
<published>2012-10-11T22:24:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=40694d6644d5cca28531707559466122eb212d8b'/>
<id>urn:sha1:40694d6644d5cca28531707559466122eb212d8b</id>
<content type='text'>
Tracing (debugfs) of expedited RCU primitives is required, which in turn
requires that the relevant data be located where the tracing code can find
it, not in its current static global variables in kernel/rcutree.c.
This commit therefore moves sync_sched_expedited_started and
sync_sched_expedited_done to the rcu_state structure, as fields
-&gt;expedited_start and -&gt;expedited_done, respectively.

Signed-off-by: Paul E. McKenney &lt;paul.mckenney@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Rename -&gt;onofflock to -&gt;orphan_lock</title>
<updated>2012-11-08T19:50:11Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paul.mckenney@linaro.org</email>
</author>
<published>2012-10-08T17:54:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7b2e6011f150c42235c4a541d20cf6891afe878a'/>
<id>urn:sha1:7b2e6011f150c42235c4a541d20cf6891afe878a</id>
<content type='text'>
The -&gt;onofflock field in the rcu_state structure at one time synchronized
CPU-hotplug operations for RCU.  However, its scope has decreased over time
so that it now only protects the lists of orphaned RCU callbacks.  This
commit therefore renames it to -&gt;orphan_lock to reflect its current use.

Signed-off-by: Paul E. McKenney &lt;paul.mckenney@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
</content>
</entry>
<entry>
<title>rcu: Grace-period initialization excludes only RCU notifier</title>
<updated>2012-10-08T16:06:38Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.vnet.ibm.com</email>
</author>
<published>2012-10-07T15:36:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a4fbe35a124526e6759be07bd9c7ea796ba1e00d'/>
<id>urn:sha1:a4fbe35a124526e6759be07bd9c7ea796ba1e00d</id>
<content type='text'>
Kirill noted the following deadlock cycle on shutdown involving padata:

&gt; With commit 755609a9087fa983f567dc5452b2fa7b089b591f I've got deadlock on
&gt; poweroff.
&gt;
&gt; It guess it happens because of race for cpu_hotplug.lock:
&gt;
&gt;       CPU A                                   CPU B
&gt; disable_nonboot_cpus()
&gt; _cpu_down()
&gt; cpu_hotplug_begin()
&gt;  mutex_lock(&amp;cpu_hotplug.lock);
&gt; __cpu_notify()
&gt; padata_cpu_callback()
&gt; __padata_remove_cpu()
&gt; padata_replace()
&gt; synchronize_rcu()
&gt;                                       rcu_gp_kthread()
&gt;                                       get_online_cpus();
&gt;                                       mutex_lock(&amp;cpu_hotplug.lock);

It would of course be good to eliminate grace-period delays from
CPU-hotplug notifiers, but that is a separate issue.  Deadlock is
not an appropriate diagnostic for excessive CPU-hotplug latency.

Fortunately, grace-period initialization does not actually need to
exclude all of the CPU-hotplug operation, but rather only RCU's own
CPU_UP_PREPARE and CPU_DEAD CPU-hotplug notifiers.  This commit therefore
introduces a new per-rcu_state onoff_mutex that provides the required
concurrency control in place of the get_online_cpus() that was previously
in rcu_gp_init().

Reported-by: "Kirill A. Shutemov" &lt;kirill@shutemov.name&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@linux.vnet.ibm.com&gt;
Tested-by: Kirill A. Shutemov &lt;kirill@shutemov.name&gt;
</content>
</entry>
</feed>
