From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [for-next][PATCH 7/7] tracing: Have stack trace not record if RCU is not watching
Date: Wed, 13 Dec 2017 20:34:34 -0800 [thread overview]
Message-ID: <20171214043434.GO7829@linux.vnet.ibm.com> (raw)
In-Reply-To: <20171213204738.186059620@goodmis.org>
On Wed, Dec 13, 2017 at 03:47:03PM -0500, Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
>
> The stack tracer records a stack dump whenever it sees a stack usage that is
> more than what it ever saw before. This can happen at any function that is
> being traced. If it happens when the CPU is going idle (or other strange
> locations), RCU may not be watching, and in this case, the recording of the
> stack trace will trigger a warning. There's been lots of efforts to make
> hacks to allow stack tracing to proceed even if RCU is not watching, but
> this only causes more issues to appear. Simply do not trace a stack if RCU
> is not watching. It probably isn't a bad stack anyway.
>
> Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
> ---
> kernel/trace/trace_stack.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/trace/trace_stack.c b/kernel/trace/trace_stack.c
> index 734accc02418..3c7bfc4bf5e9 100644
> --- a/kernel/trace/trace_stack.c
> +++ b/kernel/trace/trace_stack.c
> @@ -209,6 +209,10 @@ stack_trace_call(unsigned long ip, unsigned long parent_ip,
> if (__this_cpu_read(disable_stack_tracer) != 1)
> goto out;
>
> + /* If rcu is not watching, then save stack trace can fail */
> + if (!rcu_is_watching())
> + goto out;
> +
> ip += MCOUNT_INSN_SIZE;
>
> check_stack(ip, &stack);
> --
> 2.13.2
>
>
next prev parent reply other threads:[~2017-12-14 4:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-13 20:46 [for-next][PATCH 0/7] tracing: Fixes for 4.15 Steven Rostedt
2017-12-13 20:46 ` [for-next][PATCH 1/7] tracing: Fix code comments in trace.c Steven Rostedt
2017-12-13 20:46 ` [for-next][PATCH 2/7] tracing: always define trace_{irq,preempt}_{enable_disable} Steven Rostedt
2017-12-13 20:46 ` [for-next][PATCH 3/7] tracing: Allocate mask_str buffer dynamically Steven Rostedt
2017-12-13 20:47 ` [for-next][PATCH 4/7] tracing: make PREEMPTIRQ_EVENTS depend on TRACING Steven Rostedt
2017-12-13 20:47 ` [for-next][PATCH 5/7] ring-buffer: Remove unused function __rb_data_page_index() Steven Rostedt
2017-12-13 20:47 ` [for-next][PATCH 6/7] tracing: Pass export pointer as argument to ->write() Steven Rostedt
2017-12-13 20:47 ` [for-next][PATCH 7/7] tracing: Have stack trace not record if RCU is not watching Steven Rostedt
2017-12-14 4:34 ` Paul E. McKenney [this message]
2017-12-15 1:47 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171214043434.GO7829@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.