public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	WANG Chao <chaowang@redhat.com>,
	Greg KH <gregkh@linuxfoundation.org>, <stable@vger.kernel.org>
Subject: Re: [PATCH 3/3] ftrace: Do not call stub functions in control loop
Date: Tue, 9 Apr 2013 10:41:50 +0800	[thread overview]
Message-ID: <51637FEE.8070507@huawei.com> (raw)
In-Reply-To: <1365473805.25498.44.camel@gandalf.local.home>

On 2013/4/9 10:16, Steven Rostedt wrote:
> On Tue, 2013-04-09 at 10:08 +0800, zhangwei(Jovi) wrote:
>> On 2013/4/9 4:49, Steven Rostedt wrote:
>>> From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
>>>
>>> The function tracing control loop used by perf spits out a warning
>>> if the called function is not a control function. This is because
>>> the control function references a per cpu allocated data structure
>>> on struct ftrace_ops that is not allocated for other types of
>>> functions.
>>>
>>> commit 0a016409e42 "ftrace: Optimize the function tracer list loop"
>>>
>>> Had an optimization done to all function tracing loops to optimize
>>> for a single registered ops. Unfortunately, this allows for a slight
>>> race when tracing starts or ends, where the stub function might be
>>> called after the current registered ops is removed. In this case we
>>> get the following dump:
>>>
> 
>> Involve stable? 3.8 kernel user would need this fix.
> 
> Why? commit 0a016409e42 "ftrace: Optimize the function tracer list loop"
> was added for 3.9. 3.8 has:
> 
>         op = rcu_dereference_raw(ftrace_control_list);
>         while (op != &ftrace_list_end) {
>                 if (!ftrace_function_local_disabled(op) &&
>                     ftrace_ops_test(op, ip))
>                         op->func(ip, parent_ip, op, regs);
> 
>                 op = rcu_dereference_raw(op->next);
>         };
> 
> The stub function will never get called.
> 
> -- Steve
Hmm, You are right, I misunderstand tag info got by git describe in my local box

[root@jovi linux]# git describe 0a016409e42
trace-3.8-rc4-fix-19-g0a01640

> 
> 
> 
> 
> .
> 



  reply	other threads:[~2013-04-09  2:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-08 20:49 [PATCH 0/3] [GIT PULL] tracing: three fixes Steven Rostedt
2013-04-08 20:49 ` [PATCH 1/3] tracing: Fix race with update_max_tr_single and changing tracers Steven Rostedt
2013-04-08 20:49 ` [PATCH 2/3] ftrace: Consistently restore trace function on sysctl enabling Steven Rostedt
2013-04-08 20:49 ` [PATCH 3/3] ftrace: Do not call stub functions in control loop Steven Rostedt
2013-04-09  2:08   ` zhangwei(Jovi)
2013-04-09  2:16     ` Steven Rostedt
2013-04-09  2:41       ` zhangwei(Jovi) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-03-28 12:52 [PATCH 0/3] [GIT PULL][3.9] tracing/perf: Various fixes Steven Rostedt
2013-03-28 12:52 ` [PATCH 3/3] ftrace: Do not call stub functions in control loop Steven Rostedt
2013-03-29  3:47   ` WANG Chao

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=51637FEE.8070507@huawei.com \
    --to=jovi.zhangwei@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=chaowang@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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