This comment describes the behaviour before commit 2a820bf74918 ("tracing: Use percpu stack trace buffer more intelligently"). Since that commit, interrupts and NMIs do use the per-cpu stacks so the comment is no longer correct. Remove it. (Note that the FTRACE_STACK_SIZE mentioned in the comment has never existed, it probably should have said FTRACE_STACK_ENTRIES.) Link: https://lkml.kernel.org/r/20200727092840.18659-1-vincent.whitchurch@axis.com
Showing the changes to kernel (1 of 1 file). Show all
Unified · Split
| @@ -2930,12 +2930,6 @@ static void __ftrace_trace_stack(struct trace_buffer *buffer, · 2929 unmodified lines | |||
| 2930 | skip++; | 2930 | skip++; |
| 2931 | #endif | 2931 | #endif |
| 2932 | 2932 | ||
| 2933 | /* | ||
| 2934 | * Since events can happen in NMIs there's no safe way to | ||
| 2935 | * use the per cpu ftrace_stacks. We reserve it and if an interrupt | ||
| 2936 | * or NMI comes in, it will just have to use the default | ||
| 2937 | * FTRACE_STACK_SIZE. | ||
| 2938 | */ | ||
| 2939 | preempt_disable_notrace(); | 2933 | preempt_disable_notrace(); |
| 2940 | 2934 | ||
| 2941 | stackidx = __this_cpu_inc_return(ftrace_stack_reserve) - 1; | 2935 | stackidx = __this_cpu_inc_return(ftrace_stack_reserve) - 1; |