Skip to contentSkip to conversation

rcu: make RCU_BOOST default on RT

DISCUSSION Paul E. McKenney 2 participants 2 messages Nov 1, 2018 – Nov 8, 2018

lore
Share & tools
lore
#0 lore raw
Quoted 12 lines

Since it is no longer invoked from the softirq people run into OOM more often if the priority of the RCU thread is too low. Making boosting default on RT should help in those case and it can be switched off if someone knows better.

kernel/rcu/Kconfig +0 -0
index 644264be90f0..0be2c96fb640 100644

kernel/rcu/Kconfig config TINY_RCU · line 39

Quoted 5 lines
kernel/rcu/Kconfig +1 -1
@@ -36,7 +36,7 @@ config TINY_RCU
 
 config RCU_EXPERT
 	bool "Make expert-level adjustments to RCU configuration"
-	default n
+	default y if PREEMPT_RT_FULL

Would it work to leave this as is, and ...

kernel/rcu/Kconfig config RCU_FAST_NO_HZ · line 193

Quoted 7 lines
kernel/rcu/Kconfig +0 -0
 	help
 	  This option needs to be enabled if you wish to make
 	  expert-level adjustments to RCU configuration.  By default,
@@ -191,7 +191,7 @@ config RCU_FAST_NO_HZ
 config RCU_BOOST
 	bool "Enable RCU priority boosting"
 	depends on RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT

... make the above line instead be:

  	depends on (RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT) || PREEMPT_RT_FULL

Or am I missing something?

I agree that the risk might currently seem small, but if Linus ever starts building PREEMPT_RT_FULL kernels, I really really do not want RCU_EXPERT to be set. ;-)

Thanx, Paul

Quoted 5 lines
kernel/rcu/Kconfig +1 -1
-	default n
+	default y if PREEMPT_RT_FULL
 	help
 	  This option boosts the priority of preempted RCU readers that
 	  block the current preemptible RCU grace period for too long.
#1 lore raw
Quoted 21 lines · Paul E. McKenney

kernel/rcu/Kconfig config TINY_RCU · line 39

Quoted 8 lines
kernel/rcu/Kconfig +1 -1
@@ -36,7 +36,7 @@ config TINY_RCU
 
 config RCU_EXPERT
 	bool "Make expert-level adjustments to RCU configuration"
-	default n
+	default y if PREEMPT_RT_FULL

Would it work to leave this as is, and ...

kernel/rcu/Kconfig config RCU_FAST_NO_HZ · line 193

Quoted 7 lines
kernel/rcu/Kconfig +0 -0
 	help
 	  This option needs to be enabled if you wish to make
 	  expert-level adjustments to RCU configuration.  By default,
@@ -191,7 +191,7 @@ config RCU_FAST_NO_HZ
 config RCU_BOOST
 	bool "Enable RCU priority boosting"
 	depends on RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT

... make the above line instead be:

Quoted 7 lines
  	depends on (RT_MUTEXES && PREEMPT_RCU && RCU_EXPERT) || PREEMPT_RT_FULL

Or am I missing something?

I agree that the risk might currently seem small, but if Linus ever starts building PREEMPT_RT_FULL kernels, I really really do not want RCU_EXPERT to be set. ;-)

okay, this would work. Let me teak this in my current tree.

Quoted 1 line

Thanx, Paul

Sebastian