lkml.org 
[lkml]   [2021]   [Oct]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/2] ftrace: disable preemption on the testing of recursion
From
Date


On 2021/10/13 上午10:27, Steven Rostedt wrote:
> On Wed, 13 Oct 2021 09:50:17 +0800
> 王贇 <yun.wang@linux.alibaba.com> wrote:
>
>>>> - preempt_enable_notrace();
>>>> ftrace_test_recursion_unlock(bit);
>>>> }
>>>
>>> I don't like this change much. We have preempt_disable there not because
>>> of ftrace_test_recursion, but because of RCU. ftrace_test_recursion was
>>> added later. Yes, it would work with the change, but it would also hide
>>> things which should not be hidden in my opinion.
>>
>> Not very sure about the backgroup stories, but just found this in
>> 'Documentation/trace/ftrace-uses.rst':
>>
>> Note, on success,
>> ftrace_test_recursion_trylock() will disable preemption, and the
>> ftrace_test_recursion_unlock() will enable it again (if it was previously
>> enabled).
>
> Right that part is to be fixed by what you are adding here.
>
> The point that Miroslav is complaining about is that the preemption
> disabling is special in this case, and not just from the recursion
> point of view, which is why the comment is still required.

My bad... the title do confusing people, will rewrite it.

Regards,
Michael Wang

>
> -- Steve
>
>
>>
>> Seems like this lock pair was supposed to take care the preemtion itself?

\
 
 \ /
  Last update: 2021-10-13 04:37    [W:0.093 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site