mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masami Hiramatsu <mhiramat@kernel.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Tom Zanussi <zanussi@kernel.org>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: Have synthetic event test use raw_smp_processor_id()
Date: Fri, 21 Feb 2020 19:22:47 +0900	[thread overview]
Message-ID: <20200221192247.1b3f693f3023470b9f8a2068@kernel.org> (raw)
In-Reply-To: <20200220215236.268b4990@oasis.local.home>

On Thu, 20 Feb 2020 21:52:36 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Fri, 21 Feb 2020 09:22:30 +0900
> Masami Hiramatsu <mhiramat@kernel.org> wrote:
> 
> > On Thu, 20 Feb 2020 16:14:40 -0600
> > Tom Zanussi <zanussi@kernel.org> wrote:
> > 
> > > Hi Steve,
> > > 
> > > On Thu, 2020-02-20 at 16:29 -0500, Steven Rostedt wrote:  
> > > > From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> > > > 
> > > > The test code that tests synthetic event creation pushes in as one of
> > > > its
> > > > test fields the current CPU using "smp_processor_id()". As this is
> > > > just
> > > > something to see if the value is correctly passed in, and the actual
> > > > CPU
> > > > used does not matter, use raw_smp_processor_id(), otherwise with
> > > > debug
> > > > preemption enabled, a warning happens as the smp_processor_id() is
> > > > called
> > > > without preemption enabled.
> > > > 
> > > > Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>  
> > > 
> > > Makes sense - I guess it's simpler than Masami's and fine for this
> > > purpose.
> > > 
> > > Reviewed-by: Tom Zanussi <zanussi@kernel.org>  
> > 
> > Hmm, can we reserve ring buffer on CPU1 and commit it on CPU2?
> > Shouldn't we disable preemption between them?
> > 
> 
> I don't think it matters. There's nothing that checks it. And if one
> was concerned about the content of the CPU, one could always enable
> scheduling events and see the task migrate.

Ah, OK I confirmed that the preemption is disabled in ring_buffer_nest_start()
so it should not happen.

Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>

Thank you!

> 
> -- Steve
> 


-- 
Masami Hiramatsu <mhiramat@kernel.org>

      reply	other threads:[~2020-02-21 10:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 21:29 Steven Rostedt
2020-02-20 22:14 ` Tom Zanussi
2020-02-21  0:22   ` Masami Hiramatsu
2020-02-21  2:52     ` Steven Rostedt
2020-02-21 10:22       ` Masami Hiramatsu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200221192247.1b3f693f3023470b9f8a2068@kernel.org \
    --to=mhiramat@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=zanussi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome