Skip to content

Fix for cond_resched performance regression

Paul E. McKenney lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 18 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5rcu: Reduce overhead of cond_resched() checks for RCUinclude/linux/rcupdate.h include/linux/rcutiny.h include/linux/rcutree.h +4 more+104 -618 replies
2/5rcu: Provide cond_resched_rcu_qs() to force quiescent states in long loopsfs/file.c include/linux/rcutiny.h include/linux/rcutree.h +4 more+28 -110 replies
3/5rcu: Add RCU_COND_RESCHED_QS for large systemsinclude/linux/rcutree.h init/Kconfig+39 -20 replies
4/5rcutorture: Suppress spurious RCU CPU stall warningstools/testing/selftests/rcutorture/configs/rcu/TREE01+1 -00 replies
5/5rcu: Add boot/sysfs control for RCU cond_resched() help solicitationDocumentation/kernel-parameters.txt kernel/rcu/tree.c+29 -20 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJosh Triplett
SeriesR-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH tip/core/rcu 0/5] Fix for cond_resched performance regression

Hello!

This series contains changes to address the performance regressions introduced by commit ac1bea85781e (Make cond_resched() report RCU quiescent states), which was in turn fixing a problem where tasks looping in the kernel could delay RCU grace periods. The changes in this series are as follows:

1. Reduce the overhead of checking added to cond_resched() and friends.

2. Add a new cond_resched_rcu_qs() to provide RCU quiescent states
even if cond_resched() should stop doing so.

3. Add a new RCU_COND_RESCHED_QS to prevent cond_resched() from
reporting RCU quiescent states.

4. Prevent rcutorture testing from reporting spurious RCU CPU stall
warnings, and also to test RCU_COND_RESCHED_QS.

5. Provides a boot/sysfs rcutree.jiffies_till_cond_resched_qs
parameter to replace the magic "7".

Thanx, Paul

------------------------------------------------------------------------

 b/Documentation/kernel-parameters.txt                   |    7 +
 b/fs/file.c                                             |    2 
 b/include/linux/rcupdate.h                              |   35 -----
 b/include/linux/rcutiny.h                               |   17 ++
 b/include/linux/rcutree.h                               |   44 ++++++
 b/init/Kconfig                                          |   26 +++
 b/kernel/rcu/rcutorture.c                               |    4 
 b/kernel/rcu/tree.c                                     |  111 +++++++++++++---
 b/kernel/rcu/tree.h                                     |    6 
 b/kernel/rcu/tree_plugin.h                              |    4 
 b/kernel/rcu/update.c                                   |   18 --
 b/mm/mlock.c                                            |    2 
 b/tools/testing/selftests/rcutorture/configs/rcu/TREE01 |    1 
 13 files changed, 201 insertions(+), 76 deletions(-)