From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing, sched: mark preempt_schedule() notrace
Date: Wed, 19 Aug 2009 11:07:44 +0800 [thread overview]
Message-ID: <4A8B6C80.4050805@cn.fujitsu.com> (raw)
In-Reply-To: <alpine.DEB.2.00.0908181220280.7852@gandalf.stny.rr.com>
Steven Rostedt wrote:
>
> On Tue, 18 Aug 2009, Frederic Weisbecker wrote:
>
>> On Tue, Aug 18, 2009 at 04:01:57PM +0800, Lai Jiangshan wrote:
>>> Current preempt_schedule() is not marked notrace. It may be
>>> infinite recursion in __trace_graph_return().
>>>
>>> preempt_schedule()
>>> __trace_graph_return()
>>> ftrace_preempt_disable() (!!return false!!)
>>> ftrace_preempt_enable()
>>> preempt_enable_notrace()
>>> preempt_schedule() (need_resched() may be true again)
>>
>>
>> It would happen in __trace_graph_return() , when preempt_schedule()
>> has finished its job. It's very unlikely the TIF_NEED_RESCHED is
>> set just after (because it has just been cleared).
>> But why not. In that case, preempt_schedule() is called again but it's
>> not a real tracing recursion.
>>
>> That seems like a normal behaviour actually.
>
> In fact, this is actually something to be traced. I would not add a
> notrace to it. This is not saving anything, the trace_graph_return does
> not need to worry about stack overflow, since the return code already
> freed the stack.
>
You're right, I forgot to read trace_graph_return().
trace_graph_return() protects itself from recursion.
Since there is no may-recursive trace_func_graph_ret_t.
Just omit this patch.
Sorry for bothered you all.
next prev parent reply other threads:[~2009-08-19 3:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-18 8:01 [PATCH] tracing, sched: mark preempt_schedule() notrace Lai Jiangshan
2009-08-18 10:38 ` Frederic Weisbecker
2009-08-18 16:28 ` Steven Rostedt
2009-08-19 3:07 ` Lai Jiangshan [this message]
2009-08-19 2:33 ` Lai Jiangshan
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=4A8B6C80.4050805@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.