1. 30 Jan, 2020 11 commits
  2. 29 Jan, 2020 7 commits
  3. 25 Jan, 2020 2 commits
  4. 24 Jan, 2020 5 commits
  5. 22 Jan, 2020 2 commits
  6. 21 Jan, 2020 9 commits
  7. 16 Jan, 2020 1 commit
    • Steven Rostedt (VMware)'s avatar
      tracing: Allow trace_printk() to nest in other tracing code · 82d1b815
      Steven Rostedt (VMware) authored
      trace_printk() is used to debug the kernel which includes the tracing
      infrastructure. But because it writes to the ring buffer, and so does much
      of the tracing infrastructure, the ring buffer's recursive detection will
      drop writes to the ring buffer that is in the same context as the current
      write is happening (it allows interrupts to write when normal context is
      writing, but wont let normal context write while normal context is writing).
      
      This can cause confusion and think that the code is where the trace_printk()
      exists is not hit. To solve this, up the recursive nesting of the ring
      buffer when trace_printk() is called before it writes to the buffer itself.
      
      Note, this does make it dangerous to use trace_printk() in the ring buffer
      code itself, because this basically disables the recursion protection of
      trace_printk() buffer writes. But as trace_printk() is only used for
      debugging, and if this does occur, the developer will see the cause real
      quick (recursive blowing up of the stack). Thus the developer can deal with
      that. But having trace_printk() silently ignored is a much bigger problem,
      and disabling recursive protection is a small price to pay to fix it.
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      82d1b815
  8. 14 Jan, 2020 2 commits
  9. 13 Jan, 2020 1 commit
    • Masami Hiramatsu's avatar
      tracing: trigger: Replace unneeded RCU-list traversals · 3b42a4c8
      Masami Hiramatsu authored
      With CONFIG_PROVE_RCU_LIST, I had many suspicious RCU warnings
      when I ran ftracetest trigger testcases.
      
      -----
        # dmesg -c > /dev/null
        # ./ftracetest test.d/trigger
        ...
        # dmesg | grep "RCU-list traversed" | cut -f 2 -d ] | cut -f 2 -d " "
        kernel/trace/trace_events_hist.c:6070
        kernel/trace/trace_events_hist.c:1760
        kernel/trace/trace_events_hist.c:5911
        kernel/trace/trace_events_trigger.c:504
        kernel/trace/trace_events_hist.c:1810
        kernel/trace/trace_events_hist.c:3158
        kernel/trace/trace_events_hist.c:3105
        kernel/trace/trace_events_hist.c:5518
        kernel/trace/trace_events_hist.c:5998
        kernel/trace/trace_events_hist.c:6019
        kernel/trace/trace_events_hist.c:6044
        kernel/trace/trace_events_trigger.c:1500
        kernel/trace/trace_events_trigger.c:1540
        kernel/trace/trace_events_trigger.c:539
        kernel/trace/trace_events_trigger.c:584
      -----
      
      I investigated those warnings and found that the RCU-list
      traversals in event trigger and hist didn't need to use
      RCU version because those were called only under event_mutex.
      
      I also checked other RCU-list traversals related to event
      trigger list, and found that most of them were called from
      event_hist_trigger_func() or hist_unregister_trigger() or
      register/unregister functions except for a few cases.
      
      Replace these unneeded RCU-list traversals with normal list
      traversal macro and lockdep_assert_held() to check the
      event_mutex is held.
      
      Link: http://lkml.kernel.org/r/157680910305.11685.15110237954275915782.stgit@devnote2Reviewed-by: default avatarTom Zanussi <zanussi@kernel.org>
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      3b42a4c8