All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
	Ben Segall <bsegall@google.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Ingo Molnar <mingo@redhat.com>,
	Juri Lelli <juri.lelli@redhat.com>, Mel Gorman <mgorman@suse.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Shrikanth Hegde <sshegde@linux.ibm.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Valentin Schneider <vschneid@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Will Deacon <will@kernel.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 3/9] arm: Rely on generic printing of preemption model.
Date: Mon, 10 Feb 2025 16:26:56 +0000	[thread overview]
Message-ID: <Z6oo0MExaEy5J55_@shell.armlinux.org.uk> (raw)
In-Reply-To: <20250210153902.06VTSS6d@linutronix.de>

On Mon, Feb 10, 2025 at 04:39:02PM +0100, Sebastian Andrzej Siewior wrote:
> On 2025-02-10 15:16:11 [+0000], Russell King (Oracle) wrote:
> > On Mon, Feb 10, 2025 at 01:04:29PM +0100, Sebastian Andrzej Siewior wrote:
> > > On 2025-02-03 15:16:26 [+0100], To linux-kernel@vger.kernel.org wrote:
> > > > __die() invokes later __show_regs() -> show_regs_print_info() which
> > > > prints the current preemption model.
> > > > Remove it from the initial line.
> > > > 
> > > > Cc: Russell King <linux@armlinux.org.uk>
> > > > Cc: linux-arm-kernel@lists.infradead.org
> > > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
> > > 
> > > Is it okay, to route this via the sched tree?
> > 
> > Sorry, its not obvious where show_regs_print_info() prints this.
> > dump_stack_print_info() itself doesn't directly. print_worker_info()
> > doesn't. print_stop_info() doesn't. Not sure whether print_scx_info()
> > does.
> > 
> > Maybe showing example output would help?
> 
> Patch 2/9 adds this. [ https://lore.kernel.org/all/20250203141632.440554-3-bigeasy@linutronix.de/ ]

That explains it - patch 2 is only sent to a very restricted subset
and not even to mailing lists that would be relevant in the absence
of a direct Cc. Ditto patch 1. All I received were patches 3 and 4.

In patch 1:

+	static char buf[128];
...
+		seq_buf_init(&s, buf, 128);

Why not sizeof(buf) ?

For patch 2:

"Use
pr_warn() instead of printk() to pass a loglevel. This makes it part of
generic WARN/ BUG traces.
"

How about cases which use dump_stack_lvl() to dump the output at a more
severe level than warning? Should the message be printed at a less
severe level than the other messages?

> This this applied, die("test") on ARM ends as:
> 
> [    1.595106] Kernel panic - not syncing: test
> [    1.596044] CPU: 3 UID: 0 PID: 1 Comm: swapper/0 Tainted: G        W 6.14.0-rc2-00009-gb80a798df08c-dirty #13 PREEMPT
> [    1.596768] Tainted: [W]=WARN
> [    1.596946] Hardware name: QEMU QEMU Virtual Machine, BIOS unknown 02/02/2022

Hmm. I've no idea what you're testing, what you've quoted makes zero
sense to me.

First...

void die(const char *str, struct pt_regs *regs, int err)

is the die function prototype, so it takes a bit more than what you've
indicated.

Second, "Kernel panic" suggests that panic() has been called. However,
this only happens when die() is called (or more specifically
oops_end()) from either interrupt context (in which case we get
"Kernel panic - Fatal exception in interrupt") or if panic_on_oops
is set ("Kernel panic - Fatal exception").

I don't see a path which would result in
"Kernel panic - not syncing: test" to be printed from this path.

Since __die() does not call dump_stack(), we're not going to call
dump_stack_print_info() from __die(), so I don't think it's appropriate
to remove this information.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!


  reply	other threads:[~2025-02-10 16:29 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-03 14:16 [PATCH v2 0/9] preempt: Add a generic function to return the preemption string Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 1/9] sched: " Sebastian Andrzej Siewior
2025-02-08  8:01   ` Shrikanth Hegde
2025-02-10 10:52     ` Sebastian Andrzej Siewior
2025-02-10 14:21       ` Shrikanth Hegde
2025-02-10 14:25         ` Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 2/9] lib/dump_stack: Use preempt_model_str() Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 3/9] arm: Rely on generic printing of preemption model Sebastian Andrzej Siewior
2025-02-10 12:04   ` Sebastian Andrzej Siewior
2025-02-10 15:16     ` Russell King (Oracle)
2025-02-10 15:39       ` Sebastian Andrzej Siewior
2025-02-10 16:26         ` Russell King (Oracle) [this message]
2025-02-11 14:52           ` Sebastian Andrzej Siewior
2025-02-11 15:05             ` Russell King (Oracle)
2025-02-11 15:21               ` Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 4/9] arm64: " Sebastian Andrzej Siewior
2025-02-10 12:05   ` Sebastian Andrzej Siewior
2025-02-10 15:03     ` Will Deacon
2025-02-03 14:16 ` [PATCH v2 5/9] powerpc: Use preempt_model_str() Sebastian Andrzej Siewior
2025-02-03 15:19   ` Christophe Leroy
2025-02-03 16:01     ` Sebastian Andrzej Siewior
2025-02-03 16:37       ` Christophe Leroy
2025-02-04  8:22         ` [PATCH v3 " Sebastian Andrzej Siewior
2025-02-05  6:48           ` Christophe Leroy
2025-02-08  7:35           ` Shrikanth Hegde
2025-02-08 12:55             ` Christophe Leroy
2025-02-08 13:42               ` Shrikanth Hegde
2025-02-08 17:55                 ` Christophe Leroy
2025-02-09 14:38                   ` Shrikanth Hegde
2025-02-09 18:42                     ` Christophe Leroy
2025-02-10 10:59             ` Sebastian Andrzej Siewior
2025-02-10 14:23               ` Sebastian Andrzej Siewior
2025-02-10 17:32                 ` Shrikanth Hegde
2025-02-03 14:16 ` [PATCH v2 6/9] s390: Rely on generic printing of preemption model Sebastian Andrzej Siewior
2025-02-03 14:28   ` Heiko Carstens
2025-02-03 14:16 ` [PATCH v2 7/9] x86: " Sebastian Andrzej Siewior
2025-02-10 12:06   ` Sebastian Andrzej Siewior
2025-02-03 14:16 ` [PATCH v2 8/9] xtensa: Use preempt_model_str() Sebastian Andrzej Siewior
2025-02-03 17:55   ` Max Filippov
2025-02-03 14:16 ` [PATCH v2 9/9] tracing: " Sebastian Andrzej Siewior
2025-02-03 17:20   ` Steven Rostedt
2025-02-03 14:25 ` [PATCH v2 0/9] preempt: Add a generic function to return the preemption string Peter Zijlstra
2025-02-03 14:39   ` Sebastian Andrzej Siewior

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=Z6oo0MExaEy5J55_@shell.armlinux.org.uk \
    --to=linux@armlinux.org.uk \
    --cc=bigeasy@linutronix.de \
    --cc=bsegall@google.com \
    --cc=catalin.marinas@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=sshegde@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --cc=will@kernel.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.