Skip to contentSkip to conversation

tracing: Remove outdated comment in stack handling

PATCH In review Vincent Whitchurch 2 participants 2 messages Jul 27, 2020 Tracing

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tracing: Remove outdated comment in stack handling

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.)

---
 kernel/trace/trace.c | 6 ------
 1 file changed, 6 deletions(-)
kernel/trace/trace.c +0 -6
index bb62269724d5..0a0fd197888c 100644
@@ -2932,12 +2932,6 @@ static void __ftrace_trace_stack(struct trace_buffer *buffer,
 		skip++;
 #endif
 
-	/*
-	 * Since events can happen in NMIs there's no safe way to
-	 * use the per cpu ftrace_stacks. We reserve it and if an interrupt
-	 * or NMI comes in, it will just have to use the default
-	 * FTRACE_STACK_SIZE.
-	 */
 	preempt_disable_notrace();
 
 	stackidx = __this_cpu_inc_return(ftrace_stack_reserve) - 1;
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 5 lines · On Mon, 27 Jul 2020 11:28:40 +0200 Vincent Whitchurch…

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.

Thanks, I'll queue this up for the next merge window.

-- Steve

Quoted 5 lines

(Note that the FTRACE_STACK_SIZE mentioned in the comment has never existed, it probably should have said FTRACE_STACK_ENTRIES.)

---