From: Peter Zijlstra <peterz@infradead.org>
To: Gregory Haskins <ghaskins@novell.com>
Cc: mingo@elte.hu, rostedt@goodmis.org, tglx@linutronix.de,
linux-kernel@vger.kernel.org, linux-rt-users@vger.kernel.org
Subject: Re: [PATCH RT 2/2] ftrace: fix elevated preempt_count in wakeup-tracer
Date: Tue, 19 Aug 2008 15:12:36 +0200 [thread overview]
Message-ID: <1219151556.10800.383.camel@twins> (raw)
In-Reply-To: <20080819091923.21725.41087.stgit@dev.haskins.net>
On Tue, 2008-08-19 at 05:19 -0400, Gregory Haskins wrote:
> Suggested by Steve Rostedt to fix an observed "+1" in the preempt-count
>
> Signed-off-by: Gregory Haskins <ghaskins@novell.com>
> ---
>
> kernel/trace/trace_sched_wakeup.c | 2 ++
> 1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/kernel/trace/trace_sched_wakeup.c b/kernel/trace/trace_sched_wakeup.c
> index c3a15bd..ae523fd 100644
> --- a/kernel/trace/trace_sched_wakeup.c
> +++ b/kernel/trace/trace_sched_wakeup.c
> @@ -70,7 +70,9 @@ wakeup_tracer_call(unsigned long ip, unsigned long parent_ip)
> if (task_cpu(wakeup_task) != cpu)
> goto unlock;
>
> + preempt_enable_no_resched_notrace();
> trace_function(tr, data, ip, parent_ip, flags);
> + preempt_disable_notrace();
Is preempt_count > 1 at all times here?
If not, it might drop to 0 and any interrupt might cause preemption -
and its not obvious to me that that is actually correct.
Just asking, as neither the changelog nor the code fragment enlightens
me on the subject.
next prev parent reply other threads:[~2008-08-19 13:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-19 9:19 [PATCH RT 0/2] Misc fixes for 2.6.26-rt1 Gregory Haskins
2008-08-19 9:19 ` [PATCH RT 1/2] seqlock: make sure that raw_seqlock_t retries readers while writes are pending Gregory Haskins
2008-08-19 9:19 ` [PATCH RT 2/2] ftrace: fix elevated preempt_count in wakeup-tracer Gregory Haskins
2008-08-19 13:12 ` Peter Zijlstra [this message]
2008-08-19 13:21 ` Gregory Haskins
2008-08-19 13:45 ` Steven Rostedt
2008-08-19 14:07 ` Peter Zijlstra
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=1219151556.10800.383.camel@twins \
--to=peterz@infradead.org \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).