1. 30 Nov, 2012 1 commit
    • Frederic Weisbecker's avatar
      context_tracking: New context tracking susbsystem · 91d1aa43
      Frederic Weisbecker authored
      Create a new subsystem that probes on kernel boundaries
      to keep track of the transitions between level contexts
      with two basic initial contexts: user or kernel.
      
      This is an abstraction of some RCU code that use such tracking
      to implement its userspace extended quiescent state.
      
      We need to pull this up from RCU into this new level of indirection
      because this tracking is also going to be used to implement an "on
      demand" generic virtual cputime accounting. A necessary step to
      shutdown the tick while still accounting the cputime.
      Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Li Zhong <zhong@linux.vnet.ibm.com>
      Cc: Gilad Ben-Yossef <gilad@benyossef.com>
      Reviewed-by: default avatarSteven Rostedt <rostedt@goodmis.org>
      [ paulmck: fix whitespace error and email address. ]
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      91d1aa43
  2. 16 Nov, 2012 6 commits
    • Paul E. McKenney's avatar
      sched: Mark RCU reader in sched_show_task() · 4e79752c
      Paul E. McKenney authored
      When sched_show_task() is invoked from try_to_freeze_tasks(), there is
      no RCU read-side critical section, resulting in the following splat:
      
      [  125.780730] ===============================
      [  125.780766] [ INFO: suspicious RCU usage. ]
      [  125.780804] 3.7.0-rc3+ #988 Not tainted
      [  125.780838] -------------------------------
      [  125.780875] /home/rafael/src/linux/kernel/sched/core.c:4497 suspicious rcu_dereference_check() usage!
      [  125.780946]
      [  125.780946] other info that might help us debug this:
      [  125.780946]
      [  125.781031]
      [  125.781031] rcu_scheduler_active = 1, debug_locks = 0
      [  125.781087] 4 locks held by s2ram/4211:
      [  125.781120]  #0:  (&buffer->mutex){+.+.+.}, at: [<ffffffff811e2acf>] sysfs_write_file+0x3f/0x160
      [  125.781233]  #1:  (s_active#94){.+.+.+}, at: [<ffffffff811e2b58>] sysfs_write_file+0xc8/0x160
      [  125.781339]  #2:  (pm_mutex){+.+.+.}, at: [<ffffffff81090a81>] pm_suspend+0x81/0x230
      [  125.781439]  #3:  (tasklist_lock){.?.?..}, at: [<ffffffff8108feed>] try_to_freeze_tasks+0x2cd/0x3f0
      [  125.781543]
      [  125.781543] stack backtrace:
      [  125.781584] Pid: 4211, comm: s2ram Not tainted 3.7.0-rc3+ #988
      [  125.781632] Call Trace:
      [  125.781662]  [<ffffffff810a3c73>] lockdep_rcu_suspicious+0x103/0x140
      [  125.781719]  [<ffffffff8107cf21>] sched_show_task+0x121/0x180
      [  125.781770]  [<ffffffff8108ffb4>] try_to_freeze_tasks+0x394/0x3f0
      [  125.781823]  [<ffffffff810903b5>] freeze_kernel_threads+0x25/0x80
      [  125.781876]  [<ffffffff81090b65>] pm_suspend+0x165/0x230
      [  125.781924]  [<ffffffff8108fa29>] state_store+0x99/0x100
      [  125.781975]  [<ffffffff812f5867>] kobj_attr_store+0x17/0x20
      [  125.782038]  [<ffffffff811e2b71>] sysfs_write_file+0xe1/0x160
      [  125.782091]  [<ffffffff811667a6>] vfs_write+0xc6/0x180
      [  125.782138]  [<ffffffff81166ada>] sys_write+0x5a/0xa0
      [  125.782185]  [<ffffffff812ff6ae>] ? trace_hardirqs_on_thunk+0x3a/0x3f
      [  125.782242]  [<ffffffff81669dd2>] system_call_fastpath+0x16/0x1b
      
      This commit therefore adds the needed RCU read-side critical section.
      Reported-by: default avatar"Rafael J. Wysocki" <rjw@sisk.pl>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      4e79752c
    • Paul E. McKenney's avatar
      rcu: Separate accounting of callbacks from callback-free CPUs · c635a4e1
      Paul E. McKenney authored
      Currently, callback invocations from callback-free CPUs are accounted to
      the CPU that registered the callback, but using the same field that is
      used for normal callbacks.  This makes it impossible to determine from
      debugfs output whether callbacks are in fact being diverted.  This commit
      therefore adds a separate ->n_nocbs_invoked field in the rcu_data structure
      in which diverted callback invocations are counted.  RCU's debugfs tracing
      still displays normal callback invocations using ci=, but displayed
      diverted callbacks with nci=.
      Signed-off-by: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      c635a4e1
    • Paul E. McKenney's avatar
      rcu: Add callback-free CPUs · 3fbfbf7a
      Paul E. McKenney authored
      RCU callback execution can add significant OS jitter and also can
      degrade both scheduling latency and, in asymmetric multiprocessors,
      energy efficiency.  This commit therefore adds the ability for selected
      CPUs ("rcu_nocbs=" boot parameter) to have their callbacks offloaded
      to kthreads.  If the "rcu_nocb_poll" boot parameter is also specified,
      these kthreads will do polling, removing the need for the offloaded
      CPUs to do wakeups.  At least one CPU must be doing normal callback
      processing: currently CPU 0 cannot be selected as a no-CBs CPU.
      In addition, attempts to offline the last normal-CBs CPU will fail.
      
      This feature was inspired by Jim Houston's and Joe Korty's JRCU, and
      this commit includes fixes to problems located by Fengguang Wu's
      kbuild test robot.
      
      [ paulmck: Added gfp.h include file as suggested by Fengguang Wu. ]
      Signed-off-by: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      3fbfbf7a
    • Paul E. McKenney's avatar
      Merge branches 'urgent.2012.10.27a', 'doc.2012.11.16a', 'fixes.2012.11.13a',... · aac1cda3
      Paul E. McKenney authored
      Merge branches 'urgent.2012.10.27a', 'doc.2012.11.16a', 'fixes.2012.11.13a', 'srcu.2012.10.27a', 'stall.2012.11.13a', 'tracing.2012.11.08a' and 'idle.2012.10.24a' into HEAD
      
      urgent.2012.10.27a: Fix for RCU user-mode transition (already in -tip).
      
      doc.2012.11.08a: Documentation updates, most notably codifying the
      	memory-barrier guarantees inherent to grace periods.
      
      fixes.2012.11.13a: Miscellaneous fixes.
      
      srcu.2012.10.27a: Allow statically allocated and initialized srcu_struct
      	structures (courtesy of Lai Jiangshan).
      
      stall.2012.11.13a: Add more diagnostic information to RCU CPU stall
      	warnings, also decrease from 60 seconds to 21 seconds.
      
      hotplug.2012.11.08a: Minor updates to CPU hotplug handling.
      
      tracing.2012.11.08a: Improved debugfs tracing, courtesy of Michael Wang.
      
      idle.2012.10.24a: Updates to RCU idle/adaptive-idle handling, including
      	a boot parameter that maps normal grace periods to expedited.
      
      Resolved conflict in kernel/rcutree.c due to side-by-side change.
      aac1cda3
    • Paul E. McKenney's avatar
      rcu: Add documentation for the new rcuexp debugfs trace file · d484a215
      Paul E. McKenney authored
      This commit adds the documentation of the rcuexp debugfs trace file
      that records statistics for expedited grace periods.
      Signed-off-by: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      d484a215
    • Paul E. McKenney's avatar
      rcu: Update documentation for TREE_RCU debugfs tracing · 40e80c46
      Paul E. McKenney authored
      This commit updates the tracing documentation to reflect the new
      format that has per-RCU-flavor directories.
      Signed-off-by: default avatarPaul E. McKenney <paul.mckenney@linaro.org>
      Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
      40e80c46
  3. 13 Nov, 2012 6 commits
  4. 08 Nov, 2012 20 commits
  5. 27 Oct, 2012 3 commits
  6. 24 Oct, 2012 1 commit
  7. 23 Oct, 2012 3 commits