linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xuefeng Li <lixuefeng@loongson.cn>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH 2/2] MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER
Date: Tue, 25 May 2021 15:38:58 +0200	[thread overview]
Message-ID: <20210525133858.GA11166@alpha.franken.de> (raw)
In-Reply-To: <1621076521-22412-3-git-send-email-yangtiezhu@loongson.cn>

On Sat, May 15, 2021 at 07:02:01PM +0800, Tiezhu Yang wrote:
> When update the latest mainline kernel with the following three configs,
> the kernel hangs during startup:
> 
> (1) CONFIG_FUNCTION_GRAPH_TRACER=y
> (2) CONFIG_PREEMPT_TRACER=y
> (3) CONFIG_FTRACE_STARTUP_TEST=y
> 
> When update the latest mainline kernel with the above two configs (1)
> and (2), the kernel starts normally, but it still hangs when execute
> the following command:
> 
> echo "function_graph" > /sys/kernel/debug/tracing/current_tracer
> 
> Without CONFIG_PREEMPT_TRACER=y, the above two kinds of kernel hangs
> disappeared, so it seems that CONFIG_PREEMPT_TRACER has some influences
> with function_graph tracer at the first glance.
> 
> I use ejtag to find out the epc address is related with preempt_enable()
> in the file arch/mips/lib/mips-atomic.c, because function tracing can
> trace the preempt_{enable,disable} calls that are traced, replace them
> with preempt_{enable,disable}_notrace to prevent function tracing from
> going into an infinite loop, and then it can fix the kernel hang issue.
> 
> By the way, it seems that this commit is a complement and improvement of
> commit f93a1a00f2bd ("MIPS: Fix crash that occurs when function tracing
> is enabled").
> 
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> ---
>  arch/mips/lib/mips-atomic.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)

applied to mips-fixes.

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

      reply	other threads:[~2021-05-25 13:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 11:01 [PATCH 0/2] Update defconfig and fix kernel hang Tiezhu Yang
2021-05-15 11:02 ` [PATCH 1/2] MIPS: Loongson64: Update loongson3_defconfig Tiezhu Yang
2021-05-27 11:42   ` Thomas Bogendoerfer
2021-05-15 11:02 ` [PATCH 2/2] MIPS: Fix kernel hang under FUNCTION_GRAPH_TRACER and PREEMPT_TRACER Tiezhu Yang
2021-05-25 13:38   ` Thomas Bogendoerfer [this message]

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=20210525133858.GA11166@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lixuefeng@loongson.cn \
    --cc=rostedt@goodmis.org \
    --cc=yangtiezhu@loongson.cn \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).