1. 19 9月, 2009 1 次提交
    • P
      rcu: Add WARN_ON_ONCE() consistency checks covering state transitions · 28ecd580
      Paul E. McKenney 提交于
      o Verify that qsmask bits stay clear through GP
        initialization.
      
      o Verify that cpu_quiet_msk_finish() is never invoked unless
        there actually is an RCU grace period in progress.
      
      o Verify that all internal-node rcu_node structures have empty
        blocked_tasks[] lists.
      
      o Verify that child rcu_node structure's bits remain clear after
        acquiring parent's lock.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: akpm@linux-foundation.org
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josh@joshtriplett.org
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      LKML-Reference: <12532926191947-git-send-email->
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      28ecd580
  2. 18 9月, 2009 2 次提交
    • P
      rcu: Simplify rcu_read_unlock_special() quiescent-state accounting · c3422bea
      Paul E. McKenney 提交于
      The earlier approach required two scheduling-clock ticks to note an
      preemptable-RCU quiescent state in the situation in which the
      scheduling-clock interrupt is unlucky enough to always interrupt an
      RCU read-side critical section.
      
      With this change, the quiescent state is instead noted by the
      outermost rcu_read_unlock() immediately following the first
      scheduling-clock tick, or, alternatively, by the first subsequent
      context switch.  Therefore, this change also speeds up grace
      periods.
      Suggested-by: NJosh Triplett <josh@joshtriplett.org>
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: akpm@linux-foundation.org
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      LKML-Reference: <12528585111945-git-send-email->
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c3422bea
    • P
      rcu: Add debug checks to TREE_PREEMPT_RCU for premature grace periods · b0e165c0
      Paul E. McKenney 提交于
      Check to make sure that there are no blocked tasks for the previous
      grace period while initializing for the next grace period, verify
      that rcu_preempt_qs() is given the correct CPU number and is never
      called for an offline CPU.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: akpm@linux-foundation.org
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josh@joshtriplett.org
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      Cc: Valdis.Kletnieks@vt.edu
      LKML-Reference: <12528585111986-git-send-email->
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      b0e165c0
  3. 29 8月, 2009 2 次提交
  4. 25 8月, 2009 1 次提交
    • P
      rcu: Add CPU-offline processing for single-node configurations · 33f76148
      Paul E. McKenney 提交于
      Add preemptable-RCU plugin to handle the CPU-offline
      processing.
      
      An additional plugin is forthcoming to handle multinode RCU
      trees, but this current plugin works for configurations up to
      32 CPUs (64 CPUs for 64-bit kernels).
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: akpm@linux-foundation.org
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josht@linux.vnet.ibm.com
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      LKML-Reference: <12511321213336-git-send-email->
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      33f76148
  5. 23 8月, 2009 1 次提交
    • P
      rcu: Merge preemptable-RCU functionality into hierarchical RCU · f41d911f
      Paul E. McKenney 提交于
      Create a kernel/rcutree_plugin.h file that contains definitions
      for preemptable RCU (or, under the #else branch of the #ifdef,
      empty definitions for the classic non-preemptable semantics).
      These definitions fit into plugins defined in kernel/rcutree.c
      for this purpose.
      
      This variant of preemptable RCU uses a new algorithm whose
      read-side expense is roughly that of classic hierarchical RCU
      under CONFIG_PREEMPT. This new algorithm's update-side expense
      is similar to that of classic hierarchical RCU, and, in absence
      of read-side preemption or blocking, is exactly that of classic
      hierarchical RCU.  Perhaps more important, this new algorithm
      has a much simpler implementation, saving well over 1,000 lines
      of code compared to mainline's implementation of preemptable
      RCU, which will hopefully be retired in favor of this new
      algorithm.
      
      The simplifications are obtained by maintaining per-task
      nesting state for running tasks, and using a simple
      lock-protected algorithm to handle accounting when tasks block
      within RCU read-side critical sections, making use of lessons
      learned while creating numerous user-level RCU implementations
      over the past 18 months.
      Signed-off-by: NPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: laijs@cn.fujitsu.com
      Cc: dipankar@in.ibm.com
      Cc: akpm@linux-foundation.org
      Cc: mathieu.desnoyers@polymtl.ca
      Cc: josht@linux.vnet.ibm.com
      Cc: dvhltc@us.ibm.com
      Cc: niv@us.ibm.com
      Cc: peterz@infradead.org
      Cc: rostedt@goodmis.org
      LKML-Reference: <12509746134003-git-send-email->
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      f41d911f