lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v6 1/2] ftrace: disable preemption when recursion locked
From
Date


On 2021/10/27 上午10:55, Steven Rostedt wrote:
> On Wed, 27 Oct 2021 10:34:13 +0800
> 王贇 <yun.wang@linux.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);
>> }

\
 
 \ /
  Last update: 2021-10-27 05:10    [W:0.029 / U:4.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site