lkml.org 
[lkml]   [2018]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] rcu: Clean up rcu_init_nohz() by removing unnecessary statements
Date
Since the commit 44c65ff2e3b0(rcu: Eliminate NOCBs CPU-state Kconfig
options) made nocb-cpus identified only through the rcu_nocbs= boot
parameter, we don't have to care NOCBs CPU-state Kconfig options
anymore, which means now we can just rely on rcu_nocb_mask to
decide whether going ahead in rcu_init_nohz().

Remove the deprecated code.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
---
kernel/rcu/tree_plugin.h | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index b0d7f9b..510a6af 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -2313,22 +2313,14 @@ static void do_nocb_deferred_wakeup(struct rcu_data *rdp)
void __init rcu_init_nohz(void)
{
int cpu;
- bool need_rcu_nocb_mask = true;
struct rcu_state *rsp;

-#if defined(CONFIG_NO_HZ_FULL)
- if (tick_nohz_full_running && cpumask_weight(tick_nohz_full_mask))
- need_rcu_nocb_mask = true;
-#endif /* #if defined(CONFIG_NO_HZ_FULL) */
-
- if (!cpumask_available(rcu_nocb_mask) && need_rcu_nocb_mask) {
+ if (!cpumask_available(rcu_nocb_mask)) {
if (!zalloc_cpumask_var(&rcu_nocb_mask, GFP_KERNEL)) {
pr_info("rcu_nocb_mask allocation failed, callback offloading disabled.\n");
return;
}
}
- if (!cpumask_available(rcu_nocb_mask))
- return;

#if defined(CONFIG_NO_HZ_FULL)
if (tick_nohz_full_running)
--
1.9.1
\
 
 \ /
  Last update: 2018-02-28 10:06    [W:0.047 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site