1. 24 Feb, 2016 4 commits
    • Paul E. McKenney's avatar
      rcu: Set rdp->gpwrap when CPU is idle · 23a9bacd
      Paul E. McKenney authored
      Commit #e3663b10 ("rcu: Handle gpnum/completed wrap while dyntick
      idle") sets rdp->gpwrap on the wrong side of the "if" statement in
      dyntick_save_progress_counter(), that is, it sets it when the CPU is
      not idle instead of when it is idle.  Of course, if the CPU is not idle,
      its rdp->gpnum won't be lagging beind the global rsp->gpnum, which means
      that rdp->gpwrap will never be set.
      
      This commit therefore moves this code to the proper leg of that "if"
      statement.  This change means that the "else" cause is just "return 0"
      and the "then" clause ends with "return 1", so also move the "return 0"
      to follow the "if", dropping the "else" clause.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      23a9bacd
    • Paul E. McKenney's avatar
      rcu: Stop treating in-kernel CPU-bound workloads as errors · 4914950a
      Paul E. McKenney authored
      Commit 4a81e832 ("Reduce overhead of cond_resched() checks for RCU")
      handles the error case where a nohz_full loops indefinitely in the kernel
      with the scheduling-clock interrupt disabled.  However, this handling
      includes IPIing the CPU running the offending loop, which is not what
      we want for real-time workloads.  And there are starting to be real-time
      CPU-bound in-kernel workloads, and these must be handled without IPIing
      the CPU, at least not in the common case.  Therefore, this situation can
      no longer be dismissed as an error case.
      
      This commit therefore splits the handling out, so that the setting of
      bits in the per-CPU rcu_sched_qs_mask variable is done relatively early,
      but if the problem persists, resched_cpu() is eventually used to IPI the
      CPU containing the offending loop.  Assuming that in-kernel CPU-bound
      loops used by real-time tasks contain frequent calls cond_resched_rcu_qs()
      (as in more than once per few tens of milliseconds), the real-time tasks
      will never be IPIed.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      4914950a
    • Paul E. McKenney's avatar
      rcu: Update rcu_report_qs_rsp() comment · 8994515c
      Paul E. McKenney authored
      The header comment for rcu_report_qs_rsp() was obsolete, dating well
      before the advent of RCU grace-period kthreads.  This commit therefore
      brings this comment back into alignment with current reality.
      Reported-by: default avatarLihao Liang <lihao.liang@cs.ox.ac.uk>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      8994515c
    • Paul E. McKenney's avatar
      rcu: Assign false instead of 0 for ->core_needs_qs · bb53e416
      Paul E. McKenney authored
      A zero seems to have escaped earlier true/false substitution efforts,
      so this commit changes 0 to false for the ->core_needs_qs boolean field.
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      bb53e416
  2. 24 Jan, 2016 36 commits