1. 12 Dec, 2013 10 commits
  2. 09 Dec, 2013 4 commits
    • Paul E. McKenney's avatar
      rcu: Provide better diagnostics for blocking in RCU callback functions · 24ef659a
      Paul E. McKenney authored
      Currently blocking in an RCU callback function will result in
      "scheduling while atomic", which could be triggered for any number
      of reasons.  To aid debugging, this patch introduces a rcu_callback_map
      that is used to tie the inappropriate voluntary context switch back
      to the fact that the function is being invoked from within a callback.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      24ef659a
    • Paul E. McKenney's avatar
      rcu: Improve SRCU's grace-period comments · bc72d962
      Paul E. McKenney authored
      This commit documents the memory-barrier guarantees provided by
      synchronize_srcu() and call_srcu().
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      bc72d962
    • Paul E. McKenney's avatar
      rcu: Fix CONFIG_RCU_FANOUT_EXACT for odd fanout/leaf values · 04f34650
      Paul E. McKenney authored
      Each element of the rcu_state structure's ->levelspread[] array
      is intended to contain the per-level fanout, where the zero-th
      element corresponds to the root of the rcu_node tree, and the last
      element corresponds to the leaves.  In the CONFIG_RCU_FANOUT_EXACT
      case, this means that the last element should be filled in
      from CONFIG_RCU_FANOUT_LEAF (or from the rcu_fanout_leaf boot
      parameter, if provided) and that the remaining elements should
      be filled in from CONFIG_RCU_FANOUT.  Unfortunately, the current
      code in rcu_init_levelspread() takes the opposite approach, placing
      CONFIG_RCU_FANOUT_LEAF in the zero-th element and CONFIG_RCU_FANOUT in
      the remaining elements.
      
      For typical power-of-two values, this generates odd but functional
      rcu_node trees.  However, other values, for example CONFIG_RCU_FANOUT=3
      and CONFIG_RCU_FANOUT_LEAF=2, generate trees that can leave some CPUs
      out of the grace-period computation, resulting in too-short grace periods
      and therefore a broken RCU implementation.
      
      This commit therefore fixes rcu_init_levelspread() to set the last
      ->levelspread[] array element from CONFIG_RCU_FANOUT_LEAF and the
      remaining elements from CONFIG_RCU_FANOUT, thus generating the
      intended rcu_node trees.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      04f34650
    • Fengguang Wu's avatar
      rcu: Fix coccinelle warnings · f6f7ee9a
      Fengguang Wu authored
      This commit fixes the following coccinelle warning:
      
      kernel/rcu/tree.c:712:9-10: WARNING: return of 0/1 in function
      'rcu_lockdep_current_cpu_online' with return type bool
      
      Return statements in functions returning bool should use
       true/false instead of 1/0.
       Generated by: coccinelle/misc/boolreturn.cocci
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      f6f7ee9a
  3. 03 Dec, 2013 26 commits