lkml.org 
[lkml]   [2014]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 15/16] rcu: Check for a nocb cpu before trying to spawn nocb threads
Date
This commit tries to spawn nocb kthreads only when the CPU is marked as a nocb
cpu. This is a minor optimization.

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
---
kernel/rcu/tree_plugin.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 541c776..8abff0a 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -1490,7 +1490,8 @@ static void rcu_prepare_kthreads(int cpu)
return;

rcu_spawn_one_boost_kthread(rcu_state_p, rnp);
- rcu_spawn_all_nocb_kthreads(cpu);
+ if (rcu_is_nocb_cpu(cpu))
+ rcu_spawn_all_nocb_kthreads(cpu);
}

#else /* #ifdef CONFIG_RCU_BOOST */
--
2.0.0.rc2


\
 
 \ /
  Last update: 2014-07-23 08:02    [W:1.877 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site