All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Sergey Senozhatsky <senozhatsky@chromium.org>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.com>,
	Feng Tang <feng.tang@linux.alibaba.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] panic: remove redundant panic-cpu backtrace
Date: Thu, 31 Jul 2025 09:51:07 +0206	[thread overview]
Message-ID: <84pldghkho.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <2kwymhiz4fcozfmbmj6ju2qatsbmnrtiidfa4nxrqutgwa6xfy@dbf3caohbbay>

On 2025-07-31, Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
> On (25/07/31 09:15), John Ogness wrote:
>> On 2025-07-31, Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
>> > SYS_INFO_ALL_CPU_BT sends NMI backtrace request to
>> > all CPUs, which dumps an extra backtrace on panic CPU.
>> 
>> Isn't this only true if CONFIG_DEBUG_BUGVERBOSE=y?
>
> Are you referring to vpanic()->dump_stack()?

Yes.

> Another way to get backtrace on panic CPU is via BUG(), which routes
> through die()->__die_body(), which prints registers, stack trace,
> and so on, before it calls into panic().  This might be x86 specific,
> though.

So in that case you see 2 stack traces if CONFIG_DEBUG_BUGVERBOSE=y?

>> Also, the information is not the same. trigger_all_cpu_backtrace() will
>> also dump the registers. For CONFIG_DEBUG_BUGVERBOSE=y on the panic CPU,
>> only the stack is dumped.
>
> Hmm, it's getting complicated, probably isn't worth it then.

I think it is worth cleaning up, but it probably won't be such a simple
fix. All call paths of redundant stack trace printing should be
identified and then we can decide on a clean solution.

John

  reply	other threads:[~2025-07-31  7:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-31  3:02 [PATCH] panic: remove redundant panic-cpu backtrace Sergey Senozhatsky
2025-07-31  7:09 ` John Ogness
2025-07-31  7:32   ` Sergey Senozhatsky
2025-07-31  7:45     ` John Ogness [this message]
2025-07-31  9:51       ` Sergey Senozhatsky
2025-08-12 13:03       ` Petr Mladek
2025-08-13  6:36         ` Sergey Senozhatsky

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=84pldghkho.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=feng.tang@linux.alibaba.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=senozhatsky@chromium.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.