From: Steven Rostedt <rostedt@goodmis.org>
To: Qiujun Huang <hqjagain@gmail.com>
Cc: mingo@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] trace: Remove get/put_cpu() from function_trace_init
Date: Mon, 11 Jan 2021 18:51:29 -0500 [thread overview]
Message-ID: <20210111185129.0d5745f9@gandalf.local.home> (raw)
In-Reply-To: <20201230140521.31920-1-hqjagain@gmail.com>
On Wed, 30 Dec 2020 22:05:21 +0800
Qiujun Huang <hqjagain@gmail.com> wrote:
> Since commit b6f11df26fdc ("trace: Call tracing_reset_online_cpus before
> tracer->init()"), get/put_cpu() are not needed anymore.
> We can use raw_smp_processor_id() instead.
I added both your patches (this one and the trace_ignore_this_task()
kernel-doc fix to my queue.
Thanks!
-- Steve
>
> Signed-off-by: Qiujun Huang <hqjagain@gmail.com>
> ---
> v2:
> Use raw_smp_processor_id() instead of smp_processor_id()
> ---
> kernel/trace/trace_functions.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/kernel/trace/trace_functions.c b/kernel/trace/trace_functions.c
> index c5095dd28e20..f67aec5bb771 100644
> --- a/kernel/trace/trace_functions.c
> +++ b/kernel/trace/trace_functions.c
> @@ -106,8 +106,7 @@ static int function_trace_init(struct trace_array *tr)
>
> ftrace_init_array_ops(tr, func);
>
> - tr->array_buffer.cpu = get_cpu();
> - put_cpu();
> + tr->array_buffer.cpu = raw_smp_processor_id();
>
> tracing_start_cmdline_record();
> tracing_start_function_trace(tr);
prev parent reply other threads:[~2021-01-12 0:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-30 14:05 Qiujun Huang
2021-01-11 23:51 ` Steven Rostedt [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=20210111185129.0d5745f9@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=hqjagain@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
/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
all inboxes | Powered by JetHome®