Re: [PATCH v5 1/2] ftrace: disable preemption when recursion locked

2021-10-26 Thread 王贇
On 2021/10/27 上午10:26, Steven Rostedt wrote: > On Wed, 27 Oct 2021 09:54:13 +0800 > 王贇 wrote: > >> My apologize for the stupid comments... I'll send a v6 for this patch >> only to fix that, please let me know if this is not a good way to fix >> few lines of comments. > > Actually, please rese

Re: [PATCH v5 1/2] ftrace: disable preemption when recursion locked

2021-10-26 Thread Steven Rostedt
On Wed, 27 Oct 2021 09:54:13 +0800 王贇 wrote: > My apologize for the stupid comments... I'll send a v6 for this patch > only to fix that, please let me know if this is not a good way to fix > few lines of comments. Actually, please resend both patches, as a new patch set, on its own thread. Just

Re: [PATCH v5 1/2] ftrace: disable preemption when recursion locked

2021-10-26 Thread 王贇
On 2021/10/26 下午8:01, Steven Rostedt wrote: > On Tue, 26 Oct 2021 17:48:10 +0800 > 王贇 wrote: > >>> The two comments should be updated too since Steven removed the "bit == 0" >>> trick. >> >> Could you please give more hint on how will it be correct? >> >> I get the point that bit will no lo

Re: [PATCH v5 1/2] ftrace: disable preemption when recursion locked

2021-10-26 Thread Steven Rostedt
On Tue, 26 Oct 2021 17:48:10 +0800 王贇 wrote: > > The two comments should be updated too since Steven removed the "bit == 0" > > trick. > > Could you please give more hint on how will it be correct? > > I get the point that bit will no longer be 0, there are only -1 or > 0 now > so trace_test

Re: [PATCH v5 1/2] ftrace: disable preemption when recursion locked

2021-10-26 Thread 王贇
Hi, Miroslav On 2021/10/26 下午5:35, Miroslav Benes wrote: > Hi, > >> diff --git a/include/linux/trace_recursion.h >> b/include/linux/trace_recursion.h >> index abe1a50..2bc1522 100644 >> --- a/include/linux/trace_recursion.h >> +++ b/include/linux/trace_recursion.h >> @@ -135,6 +135,9 @@ static _

Re: [PATCH v5 1/2] ftrace: disable preemption when recursion locked

2021-10-26 Thread Miroslav Benes
Hi, > diff --git a/include/linux/trace_recursion.h b/include/linux/trace_recursion.h > index abe1a50..2bc1522 100644 > --- a/include/linux/trace_recursion.h > +++ b/include/linux/trace_recursion.h > @@ -135,6 +135,9 @@ static __always_inline int trace_get_context_bit(void) > # define do_ftrace_re

[PATCH v5 1/2] ftrace: disable preemption when recursion locked

2021-10-25 Thread 王贇
As the documentation explained, ftrace_test_recursion_trylock() and ftrace_test_recursion_unlock() were supposed to disable and enable preemption properly, however currently this work is done outside of the function, which could be missing by mistake. And since the internal using of trace_test_and