From: Gregory Haskins <ghaskins@novell.com>
To: Peter Zijlstra <peterz@infradead.org>
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 09:21:43 -0400 [thread overview]
Message-ID: <48AAC8E7.1030506@novell.com> (raw)
In-Reply-To: <1219151556.10800.383.camel@twins>
[-- Attachment #1: Type: text/plain, Size: 1672 bytes --]
Peter Zijlstra wrote:
> 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.
>
According to Steve, we are already in an interrupt-disabled section
here, but I will defer to him. He suggested I try this over an IRC
conversation when I noticed a strange wakeup trace, and it seems to have
solved the problem.
Im really sending this patch more of a reminder to Steve that he was
going to fix this, rather than to accept my patch as is. Of course I
don't mind if it is accepted as is, and I can make the prologue/comments
more descriptive if necessary. But if Steve wants to do something like
fold this into his ftrace series, that is fine too. I just didn't want
it to be forgotten ;)
-Greg
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 257 bytes --]
next prev parent reply other threads:[~2008-08-19 13:24 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
2008-08-19 13:21 ` Gregory Haskins [this message]
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=48AAC8E7.1030506@novell.com \
--to=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--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