lkml.org 
[lkml]   [2020]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] tracing: Fix synth event test to avoid using smp_processor_id()
On Thu, 20 Feb 2020 17:48:01 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Mon, 17 Feb 2020 18:52:29 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
>
> > Since smp_processor_id() requires irq-disabled or preempt-disabled,
> > synth event generation test module made some warnings. To prevent
> > that, use get_cpu()/put_cpu() instead of smp_processor_id().
> >
> > Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
> > ---
> > kernel/trace/synth_event_gen_test.c | 23 +++++++++++++++++------
> > 1 file changed, 17 insertions(+), 6 deletions(-)
> >
>
> I just noticed this patch, after applying my version that just uses the
> raw_smp_processor_id(). We don't really care what CPU it is do we?
>
> I didn't want a test to muck with preemption disabling and all that fun.

OK, I confirmed that the ring_buffer_nest_start() ensures the preempt
disabled. So just using raw_smp_processor_id() is good to me.

Thank you,

--
Masami Hiramatsu <mhiramat@kernel.org>

\
 
 \ /
  Last update: 2020-02-21 11:25    [W:0.049 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site