[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 17/30] tracing: Improve panic/die notifiers
- To: Petr Mladek <pmladek@xxxxxxxx>, rostedt@xxxxxxxxxxx
- From: "Guilherme G. Piccoli" <gpiccoli@xxxxxxxxxx>
- Date: Tue, 17 May 2022 12:33:52 -0300
- Cc: akpm@xxxxxxxxxxxxxxxxxxxx, bhe@xxxxxxxxxx, kexec@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, bcm-kernel-feedback-list@xxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-leds@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-pm@xxxxxxxxxxxxxxx, linux-remoteproc@xxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-tegra@xxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, rcu@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, kernel-dev@xxxxxxxxxx, kernel@xxxxxxxxxxxx, halves@xxxxxxxxxxxxx, fabiomirmar@xxxxxxxxx, alejandro.j.jimenez@xxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, arnd@xxxxxxxx, bp@xxxxxxxxx, corbet@xxxxxxx, d.hatayama@xxxxxxxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, dyoung@xxxxxxxxxx, feng.tang@xxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, mikelley@xxxxxxxxxxxxx, hidehiro.kawai.ez@xxxxxxxxxxx, jgross@xxxxxxxx, john.ogness@xxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, luto@xxxxxxxxxx, mhiramat@xxxxxxxxxx, mingo@xxxxxxxxxx, paulmck@xxxxxxxxxx, peterz@xxxxxxxxxxxxx, senozhatsky@xxxxxxxxxxxx, stern@xxxxxxxxxxxxxxxxxxx, tglx@xxxxxxxxxxxxx, vgoyal@xxxxxxxxxx, vkuznets@xxxxxxxxxx, will@xxxxxxxxxx
- Delivery-date: Tue, 17 May 2022 15:34:36 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On 11/05/2022 08:45, Petr Mladek wrote:
> [...]
> DIE_OOPS and PANIC_NOTIFIER are from different enum.
> It feels like comparing apples with oranges here.
>
> IMHO, the proper way to unify the two notifiers is
> a check of the @self parameter. Something like:
>
> static int trace_die_panic_handler(struct notifier_block *self,
> unsigned long ev, void *unused)
> {
> if (self == trace_die_notifier && val != DIE_OOPS)
> goto out;
>
> ftrace_dump(ftrace_dump_on_oops);
> out:
> return NOTIFY_DONE;
> }
>
> Best Regards,
> Petr
OK Petr, thanks - will implement your suggestion in V2 (CC Steven)
Cheers!
|