[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e8bb4220-4895-e55d-4aea-cdd265fdfd38@linux.alibaba.com>
Date: Wed, 27 Oct 2021 11:09:29 +0800
From: 王贇 <yun.wang@...ux.alibaba.com>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Guo Ren <guoren@...nel.org>, Ingo Molnar <mingo@...hat.com>,
"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
Helge Deller <deller@....de>,
Michael Ellerman <mpe@...erman.id.au>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Thomas Gleixner <tglx@...utronix.de>,
Borislav Petkov <bp@...en8.de>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jiri Kosina <jikos@...nel.org>,
Miroslav Benes <mbenes@...e.cz>,
Petr Mladek <pmladek@...e.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
Nicholas Piggin <npiggin@...il.com>,
Jisheng Zhang <jszhang@...nel.org>, linux-csky@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
live-patching@...r.kernel.org
Subject: Re: [PATCH v6 1/2] ftrace: disable preemption when recursion locked
On 2021/10/27 上午10:55, Steven Rostedt wrote:
> On Wed, 27 Oct 2021 10:34:13 +0800
> 王贇 <yun.wang@...ux.alibaba.com> wrote:
>
>> +/*
>> + * Preemption will be enabled (if it was previously enabled).
>> + */
>> static __always_inline void trace_clear_recursion(int bit)
>> {
>> + WARN_ON_ONCE(bit < 0);
>
> Can you send a v7 without the WARN_ON.
>
> This is an extremely hot path, and this will cause noticeable overhead.
>
> If something were to call this with bit < 0, then it would crash and
> burn rather quickly.
I see, if the problem will be notified anyway then it's fine, v7 on the way.
Regards,
Michael Wang
>
> -- Steve
>
>
>> +
>> + preempt_enable_notrace();
>> barrier();
>> trace_recursion_clear(bit);
>> }
Powered by blists - more mailing lists