<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/kernel/rcu/tree.h, branch jd/unified-crypt-queue</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/kernel/rcu/tree.h?h=jd%2Funified-crypt-queue</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/kernel/rcu/tree.h?h=jd%2Funified-crypt-queue'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2020-02-21T00:00:20Z</updated>
<entry>
<title>rcu: React to callback overload by aggressively seeking quiescent states</title>
<updated>2020-02-21T00:00:20Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2019-10-30T18:56:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=b2b00ddf193bf83dc561d965c67b18eb54ebcd83'/>
<id>urn:sha1:b2b00ddf193bf83dc561d965c67b18eb54ebcd83</id>
<content type='text'>
In default configutions, RCU currently waits at least 100 milliseconds
before asking cond_resched() and/or resched_rcu() for help seeking
quiescent states to end a grace period.  But 100 milliseconds can be
one good long time during an RCU callback flood, for example, as can
happen when user processes repeatedly open and close files in a tight
loop.  These 100-millisecond gaps in successive grace periods during a
callback flood can result in excessive numbers of callbacks piling up,
unnecessarily increasing memory footprint.

This commit therefore asks cond_resched() and/or resched_rcu() for help
as early as the first FQS scan when at least one of the CPUs has more
than 20,000 callbacks queued, a number that can be changed using the new
rcutree.qovld kernel boot parameter.  An auxiliary qovld_calc variable
is used to avoid acquisition of locks that have not yet been initialized.
Early tests indicate that this reduces the RCU-callback memory footprint
during rcutorture floods by from 50% to 4x, depending on configuration.

Reported-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
Reported-by: Tejun Heo &lt;tj@kernel.org&gt;
[ paulmck: Fix bug located by Qian Cai. ]
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Tested-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Tested-by: Qian Cai &lt;cai@lca.pw&gt;
</content>
</entry>
<entry>
<title>Merge branches 'doc.2019.12.10a', 'exp.2019.12.09a', 'fixes.2020.01.24a', 'kfree_rcu.2020.01.24a', 'list.2020.01.10a', 'preempt.2020.01.24a' and 'torture.2019.12.09a' into HEAD</title>
<updated>2020-01-24T18:37:27Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2020-01-24T18:37:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=0e247386d9ed5ab8b7dad010cf4b183efeb1e47d'/>
<id>urn:sha1:0e247386d9ed5ab8b7dad010cf4b183efeb1e47d</id>
<content type='text'>
doc.2019.12.10a: Documentations updates
exp.2019.12.09a: Expedited grace-period updates
fixes.2020.01.24a: Miscellaneous fixes
kfree_rcu.2020.01.24a: Batch kfree_rcu() work
list.2020.01.10a: RCU-protected-list updates
preempt.2020.01.24a: Preemptible RCU updates
torture.2019.12.09a: Torture-test updates
</content>
</entry>
<entry>
<title>rcu: Remove unused stop-machine #include</title>
<updated>2020-01-24T18:33:52Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2019-11-27T19:36:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f6105fc2a9c0ea5be6b9e5c19b2551af0b8b4eac'/>
<id>urn:sha1:f6105fc2a9c0ea5be6b9e5c19b2551af0b8b4eac</id>
<content type='text'>
Long ago, RCU used the stop-machine mechanism to implement expedited
grace periods, but no longer does so.  This commit therefore removes
the no-longer-needed #includes of linux/stop_machine.h.

Link: https://lwn.net/Articles/805317/
Reported-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Move gp_state_names[] and gp_state_getname() to tree_stall.h</title>
<updated>2020-01-24T18:33:45Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>jiangshanlai@gmail.com</email>
</author>
<published>2019-10-15T10:28:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e2167b38c87a0c9e85c342a823dae1e6f67b11d9'/>
<id>urn:sha1:e2167b38c87a0c9e85c342a823dae1e6f67b11d9</id>
<content type='text'>
Only tree_stall.h needs to get name from GP state, so this commit
moves the gp_state_names[] array and the gp_state_getname()
from kernel/rcu/tree.h and kernel/rcu/tree.c, respectively, to
kernel/rcu/tree_stall.h.  While moving gp_state_names[], this commit
uses the GCC syntax to ensure that the right string is associated with
the right CPP macro.

Signed-off-by: Lai Jiangshan &lt;jiangshanlai@gmail.com&gt;
Signed-off-by: Lai Jiangshan &lt;laijs@linux.alibaba.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Remove the declaration of call_rcu() in tree.h</title>
<updated>2020-01-24T18:33:38Z</updated>
<author>
<name>Lai Jiangshan</name>
<email>jiangshanlai@gmail.com</email>
</author>
<published>2019-10-15T10:28:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=4778339df0ee361dbf2cbdcb87abaec9dfbc841d'/>
<id>urn:sha1:4778339df0ee361dbf2cbdcb87abaec9dfbc841d</id>
<content type='text'>
The call_rcu() function is an external RCU API that is declared in
include/linux/rcupdate.h.  There is thus no point in redeclaring it
in kernel/rcu/tree.h, so this commit removes that redundant declaration.

Signed-off-by: Lai Jiangshan &lt;jiangshanlai@gmail.com&gt;
Signed-off-by: Lai Jiangshan &lt;laijs@linux.alibaba.com&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Remove kfree_rcu() special casing and lazy-callback handling</title>
<updated>2020-01-24T18:24:31Z</updated>
<author>
<name>Joel Fernandes (Google)</name>
<email>joel@joelfernandes.org</email>
</author>
<published>2019-08-30T16:36:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=77a40f97030b27b3fc1640a3ed203870f0817f57'/>
<id>urn:sha1:77a40f97030b27b3fc1640a3ed203870f0817f57</id>
<content type='text'>
This commit removes kfree_rcu() special-casing and the lazy-callback
handling from Tree RCU.  It moves some of this special casing to Tiny RCU,
the removal of which will be the subject of later commits.

This results in a nice negative delta.

Suggested-by: Paul E. McKenney &lt;paulmck@linux.ibm.com&gt;
Signed-off-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
[ paulmck: Add slab.h #include, thanks to kbuild test robot &lt;lkp@intel.com&gt;. ]
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Mark non-global functions and variables as static</title>
<updated>2019-12-12T18:24:52Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2019-10-12T04:40:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c30fe541896440667bd9e9068aedd1d440fbbcd2'/>
<id>urn:sha1:c30fe541896440667bd9e9068aedd1d440fbbcd2</id>
<content type='text'>
Each of rcu_state, rcu_rnp_online_cpus(), rcu_dynticks_curr_cpu_in_eqs(),
and rcu_dynticks_snap() are used only in the kernel/rcu/tree.o translation
unit, and may thus be marked static.  This commit therefore makes this
change.

Reported-by: Ben Dooks &lt;ben.dooks@codethink.co.uk&gt;
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
Reviewed-by: Joel Fernandes (Google) &lt;joel@joelfernandes.org&gt;
</content>
</entry>
<entry>
<title>rcu: Enable tick for nohz_full CPUs slow to provide expedited QS</title>
<updated>2019-12-09T20:32:59Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2019-11-28T00:36:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=df1e849ae4559544ff00ff5052eefe2479750539'/>
<id>urn:sha1:df1e849ae4559544ff00ff5052eefe2479750539</id>
<content type='text'>
An expedited grace period can be stalled by a nohz_full CPU looping
in kernel context.  This possibility is currently handled by some
carefully crafted checks in rcu_read_unlock_special() that enlist help
from ksoftirqd when permitted by the scheduler.  However, it is exactly
these checks that require the scheduler avoid holding any of its rq or
pi locks across rcu_read_unlock() without also having held them across
the entire RCU read-side critical section.

It would therefore be very nice if expedited grace periods could
handle nohz_full CPUs looping in kernel context without such checks.
This commit therefore adds code to the expedited grace period's wait
and cleanup code that forces the scheduler-clock interrupt on for CPUs
that fail to quickly supply a quiescent state.  "Quickly" is currently
a hard-coded single-jiffy delay.

Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu: Force tick on for nohz_full CPUs not reaching quiescent states</title>
<updated>2019-10-28T14:02:21Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@kernel.org</email>
</author>
<published>2019-08-12T23:14:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=66e4c33b51bc515ca803c0948cf1525b53ffd631'/>
<id>urn:sha1:66e4c33b51bc515ca803c0948cf1525b53ffd631</id>
<content type='text'>
CPUs running for long time periods in the kernel in nohz_full mode
might leave the scheduling-clock interrupt disabled for then full
duration of their in-kernel execution.  This can (among other things)
delay grace periods.  This commit therefore forces the tick back on
for any nohz_full CPU that is failing to pass through a quiescent state
upon return from interrupt, which the resched_cpu() will induce.

Reported-by: Joel Fernandes &lt;joel@joelfernandes.org&gt;
[ paulmck: Clear -&gt;rcu_forced_tick as reported by Joel Fernandes testing. ]
[ paulmck: Apply Joel Fernandes TICK_DEP_MASK_RCU-&gt;TICK_DEP_BIT_RCU fix. ]
Signed-off-by: Paul E. McKenney &lt;paulmck@kernel.org&gt;
</content>
</entry>
<entry>
<title>rcu/nocb: Print no-CBs diagnostics when rcutorture writer unduly delayed</title>
<updated>2019-08-13T21:38:24Z</updated>
<author>
<name>Paul E. McKenney</name>
<email>paulmck@linux.ibm.com</email>
</author>
<published>2019-06-25T20:32:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=f7a81b12d6af42a9d09be1e5f041169f04b0b67a'/>
<id>urn:sha1:f7a81b12d6af42a9d09be1e5f041169f04b0b67a</id>
<content type='text'>
This commit causes locking, sleeping, and callback state to be printed
for no-CBs CPUs when the rcutorture writer is delayed sufficiently for
rcutorture to complain.

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