1. 10 9月, 2009 2 次提交
    • S
      tracing: do not grab lock in wakeup latency function tracing · 478142c3
      Steven Rostedt 提交于
      The wakeup tracer, when enabled, has its own function tracer.
      It only traces the functions on the CPU where the task it is following
      is on. If a task is woken on one CPU but then migrates to another CPU
      before it wakes up, the latency tracer will then start tracing functions
      on the other CPU.
      
      To find which CPU the task is on, the wakeup function tracer performs
      a task_cpu(wakeup_task). But to make sure the task does not disappear
      it grabs the wakeup_lock, which is also taken when the task wakes up.
      By taking this lock, the function tracer does not need to worry about
      the task being freed as it checks its cpu.
      
      Jan Blunck found a problem with this approach on his 32 CPU box. When
      a task is being traced by the wakeup tracer, all functions take this
      lock. That means that on all 32 CPUs, each function call is taking
      this one lock to see if the task is on that CPU. This lock has just
      serialized all functions on all 32 CPUs. Needless to say, this caused
      major issues on that box. It would even lockup.
      
      This patch changes the wakeup latency to insert a probe on the migrate task
      tracepoint. When a task changes its CPU that it will run on, the
      probe will take note. Now the wakeup function tracer no longer needs
      to take the lock. It only compares the current CPU with a variable that
      holds the current CPU the task is on. We don't worry about races since
      it is OK to add or miss a function trace.
      Reported-by: NJan Blunck <jblunck@suse.de>
      Tested-by: NJan Blunck <jblunck@suse.de>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      478142c3
    • R
      ring-buffer: consolidate interface of rb_buffer_peek() · d8eeb2d3
      Robert Richter 提交于
      rb_buffer_peek() operates with struct ring_buffer_per_cpu *cpu_buffer
      only. Thus, instead of passing variables buffer and cpu it is better
      to use cpu_buffer directly. This also reduces the risk of races since
      cpu_buffer is not calculated twice.
      Signed-off-by: NRobert Richter <robert.richter@amd.com>
      LKML-Reference: <1249045084-3028-1-git-send-email-robert.richter@amd.com>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      d8eeb2d3
  2. 06 9月, 2009 29 次提交
  3. 05 9月, 2009 9 次提交