Skip to content

Commit 999b96b

Browse files
Pavankumar Kondetigregkh
authored andcommitted
tracing: Use SOFTIRQ_OFFSET for softirq dectection for more accurate results
commit c59f29cb144a6a0dfac16ede9dc8eafc02dc56ca upstream. The 's' flag is supposed to indicate that a softirq is running. This can be detected by testing the preempt_count with SOFTIRQ_OFFSET. The current code tests the preempt_count with SOFTIRQ_MASK, which would be true even when softirqs are disabled but not serving a softirq. Link: http://lkml.kernel.org/r/1481300417-3564-1-git-send-email-pkondeti@codeaurora.org Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org> Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Amit Pundir <amit.pundir@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent c17f651 commit 999b96b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/trace/trace.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1660,7 +1660,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags,
16601660
TRACE_FLAG_IRQS_NOSUPPORT |
16611661
#endif
16621662
((pc & HARDIRQ_MASK) ? TRACE_FLAG_HARDIRQ : 0) |
1663-
((pc & SOFTIRQ_MASK) ? TRACE_FLAG_SOFTIRQ : 0) |
1663+
((pc & SOFTIRQ_OFFSET) ? TRACE_FLAG_SOFTIRQ : 0) |
16641664
(tif_need_resched() ? TRACE_FLAG_NEED_RESCHED : 0) |
16651665
(test_preempt_need_resched() ? TRACE_FLAG_PREEMPT_RESCHED : 0);
16661666
}

0 commit comments

Comments
 (0)