[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7181a47b-001c-0588-4102-1cfd8bead0ac@igalia.com>
Date: Tue, 16 Aug 2022 17:12:33 -0300
From: "Guilherme G. Piccoli" <gpiccoli@...lia.com>
To: Steven Rostedt <rostedt@...dmis.org>,
Alan Stern <stern@...land.harvard.edu>
Cc: akpm@...ux-foundation.org, bhe@...hat.com, pmladek@...e.com,
kexec@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-hyperv@...r.kernel.org, netdev@...r.kernel.org,
x86@...nel.org, kernel-dev@...lia.com, kernel@...ccoli.net,
halves@...onical.com, fabiomirmar@...il.com,
alejandro.j.jimenez@...cle.com, andriy.shevchenko@...ux.intel.com,
arnd@...db.de, bp@...en8.de, corbet@....net,
d.hatayama@...fujitsu.com, dave.hansen@...ux.intel.com,
dyoung@...hat.com, feng.tang@...el.com, gregkh@...uxfoundation.org,
mikelley@...rosoft.com, hidehiro.kawai.ez@...achi.com,
jgross@...e.com, john.ogness@...utronix.de, keescook@...omium.org,
luto@...nel.org, mhiramat@...nel.org, mingo@...hat.com,
paulmck@...nel.org, peterz@...radead.org, senozhatsky@...omium.org,
tglx@...utronix.de, vgoyal@...hat.com, vkuznets@...hat.com,
will@...nel.org, Sergei Shtylyov <sergei.shtylyov@...il.com>
Subject: Re: [PATCH v2 08/13] tracing: Improve panic/die notifiers
On 16/08/2022 12:52, Steven Rostedt wrote:
> On Tue, 16 Aug 2022 10:57:20 -0400
> Alan Stern <stern@...land.harvard.edu> wrote:
>
>>> static int trace_die_panic_handler(struct notifier_block *self,
>>> unsigned long ev, void *unused)
>>> {
>>> if (!ftrace_dump_on_oops)
>>> return NOTIFY_DONE;
>>>
>>> /* The die notifier requires DIE_OOPS to trigger */
>>> if (self == &trace_die_notifier && ev != DIE_OOPS)
>>> return NOTIFY_DONE;
>>>
>>> ftrace_dump(ftrace_dump_on_oops);
>>>
>>> return NOTIFY_DONE;
>>> }
>>
>> Or better yet:
>>
>> if (ftrace_dump_on_oops) {
>>
>> /* The die notifier requires DIE_OOPS to trigger */
>> if (self != &trace_die_notifier || ev == DIE_OOPS)
>> ftrace_dump(ftrace_dump_on_oops);
>> }
>> return NOTIFY_DONE;
>>
>
> That may be more consolidated but less easy to read and follow. This is far
> from a fast path.
>
> As I maintain this bike-shed, I prefer the one I suggested ;-)
>
> -- Steve
Perfect Steve and Alan, appreciate your suggestions!
I'll submit V3 using your change Steve - honestly, I'm not sure why in
the heck I put a goto there, yours is basically the same code, modulo
the goto heheh
A braino from me, for sure!
Cheers,
Guilherme
Powered by blists - more mailing lists