From: Paul E. McKenney Date: Fri, 20 Mar 2015 15:31:01 +0000 (-0700) Subject: Merge branches 'doc.2015.02.26a', 'earlycb.2015.03.03a', 'fixes.2015.03.03a', 'gpexp... X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=42528795ac1c8d7ba021797ec004904168956d64;p=linux-beck.git Merge branches 'doc.2015.02.26a', 'earlycb.2015.03.03a', 'fixes.2015.03.03a', 'gpexp.2015.02.26a', 'hotplug.2015.03.20a', 'sysidle.2015.02.26b' and 'tiny.2015.02.26a' into HEAD doc.2015.02.26a: Documentation changes earlycb.2015.03.03a: Permit early-boot RCU callbacks fixes.2015.03.03a: Miscellaneous fixes gpexp.2015.02.26a: In-kernel expediting of normal grace periods hotplug.2015.03.20a: CPU hotplug fixes sysidle.2015.02.26b: NO_HZ_FULL_SYSIDLE fixes tiny.2015.02.26a: TINY_RCU fixes --- 42528795ac1c8d7ba021797ec004904168956d64 diff --cc kernel/rcu/tree.c index 48d640ca1a05,c8e6569c5fbd,23194a77a768,4325fbe79d84,8fcc64ed858c,a6972c20eaa5,48d640ca1a05..233165da782f --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c @@@@@@@@ -101,11 -103,10 -101,11 -101,11 -101,10 -101,11 -101,11 +103,9 @@@@@@@@ struct rcu_state sname##_state = { .orphan_nxttail = &sname##_state.orphan_nxtlist, \ .orphan_donetail = &sname##_state.orphan_donelist, \ .barrier_mutex = __MUTEX_INITIALIZER(sname##_state.barrier_mutex), \ ---- -- .onoff_mutex = __MUTEX_INITIALIZER(sname##_state.onoff_mutex), \ .name = RCU_STATE_NAME(sname), \ .abbr = sabbr, \ - -----}; \ - -----DEFINE_PER_CPU_SHARED_ALIGNED(struct rcu_data, sname##_data) + +++++} RCU_STATE_INITIALIZER(rcu_sched, 's', call_rcu_sched); RCU_STATE_INITIALIZER(rcu_bh, 'b', call_rcu_bh); @@@@@@@@ -3734,30 -3757,30 -3734,26 -3735,30 -3900,30 -3734,30 -3734,30 +3924,26 @@@@@@@@ void rcu_scheduler_starting(void * Compute the per-level fanout, either using the exact fanout specified * or balancing the tree, depending on CONFIG_RCU_FANOUT_EXACT. */ -- ----#ifdef CONFIG_RCU_FANOUT_EXACT -- - --static void __init rcu_init_levelspread(struct rcu_state *rsp) -- - --{ -- - -- int i; -- - -- -- - -- rsp->levelspread[rcu_num_lvls - 1] = rcu_fanout_leaf; -- - -- for (i = rcu_num_lvls - 2; i >= 0; i--) -- - -- rsp->levelspread[i] = CONFIG_RCU_FANOUT; -- - --} -- - --#else /* #ifdef CONFIG_RCU_FANOUT_EXACT */ static void __init rcu_init_levelspread(struct rcu_state *rsp) { -- - -- int ccur; -- - -- int cprv; int i; - rsp->levelspread[rcu_num_lvls - 1] = rcu_fanout_leaf; - for (i = rcu_num_lvls - 2; i >= 0; i--) - rsp->levelspread[i] = CONFIG_RCU_FANOUT; - } - #else /* #ifdef CONFIG_RCU_FANOUT_EXACT */ - static void __init rcu_init_levelspread(struct rcu_state *rsp) - { - int ccur; - int cprv; - int i; - -- ---- cprv = nr_cpu_ids; -- ---- for (i = rcu_num_lvls - 1; i >= 0; i--) { -- ---- ccur = rsp->levelcnt[i]; -- ---- rsp->levelspread[i] = (cprv + ccur - 1) / ccur; -- ---- cprv = ccur; ++ ++++ if (IS_ENABLED(CONFIG_RCU_FANOUT_EXACT)) { ++ ++++ rsp->levelspread[rcu_num_lvls - 1] = rcu_fanout_leaf; ++ ++++ for (i = rcu_num_lvls - 2; i >= 0; i--) ++ ++++ rsp->levelspread[i] = CONFIG_RCU_FANOUT; ++ ++++ } else { ++ ++++ int ccur; ++ ++++ int cprv; ++ ++++ ++ ++++ cprv = nr_cpu_ids; ++ ++++ for (i = rcu_num_lvls - 1; i >= 0; i--) { ++ ++++ ccur = rsp->levelcnt[i]; ++ ++++ rsp->levelspread[i] = (cprv + ccur - 1) / ccur; ++ ++++ cprv = ccur; ++ ++++ } } } -- ----#endif /* #else #ifdef CONFIG_RCU_FANOUT_EXACT */ /* * Helper function for rcu_init() that initializes one rcu_state structure. diff --cc kernel/rcu/tree_plugin.h index 0a571e9a0f1d,afddd5641bea,c9225350d3ed,63726b734d34,d45e961515c1,b46c92824db1,0a571e9a0f1d..8c0ec0f5a027 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h @@@@@@@@ -757,19 -757,19 -758,19 -757,19 -759,16 -757,19 -757,19 +760,16 @@@@@@@@ void synchronize_rcu_expedited(void /* force all RCU readers onto ->blkd_tasks lists. */ synchronize_sched_expedited(); ---- -- /* Initialize ->expmask for all non-leaf rcu_node structures. */ ---- -- rcu_for_each_nonleaf_node_breadth_first(rsp, rnp) { ---- -- raw_spin_lock_irqsave(&rnp->lock, flags); ---- -- smp_mb__after_unlock_lock(); ---- -- rnp->expmask = rnp->qsmaskinit; ---- -- raw_spin_unlock_irqrestore(&rnp->lock, flags); ---- -- } ---- -- ---- -- /* Snapshot current state of ->blkd_tasks lists. */ ++++ ++ /* ++++ ++ * Snapshot current state of ->blkd_tasks lists into ->expmask. ++++ ++ * Phase 1 sets bits and phase 2 permits rcu_read_unlock_special() ++++ ++ * to start clearing them. Doing this in one phase leads to ++++ ++ * strange races between setting and clearing bits, so just say "no"! ++++ ++ */ ++ + ++ rcu_for_each_leaf_node(rsp, rnp) - sync_rcu_preempt_exp_init(rsp, rnp); - if (NUM_RCU_NODES > 1) - sync_rcu_preempt_exp_init(rsp, rcu_get_root(rsp)); ++++ ++ sync_rcu_preempt_exp_init1(rsp, rnp); + rcu_for_each_leaf_node(rsp, rnp) -- - -- sync_rcu_preempt_exp_init(rsp, rnp); -- - -- if (NUM_RCU_NODES > 1) -- - -- sync_rcu_preempt_exp_init(rsp, rcu_get_root(rsp)); ++++ ++ sync_rcu_preempt_exp_init2(rsp, rnp); put_online_cpus();