linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Gregory Haskins <ghaskins@novell.com>,
	mingo@elte.hu, 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 16:07:48 +0200	[thread overview]
Message-ID: <1219154869.10800.386.camel@twins> (raw)
In-Reply-To: <alpine.DEB.1.10.0808190942070.23667@gandalf.stny.rr.com>

On Tue, 2008-08-19 at 09:45 -0400, Steven Rostedt wrote:
> On Tue, 19 Aug 2008, Gregory Haskins wrote:
> > > 
> > > 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.
> 
> Exactly.
> 
> Peter,
> 
> We disable preemption, do a per_cpu check, if we are not nested we grab 
> disable interrupts and grab the spin lock.
> 
> The issue that Gregory brought up, was that the tracer would always show 
> that preemption was disabled, when it really wasn't. It was recording the
> preempt disabled that the trace function itself made. The answer was 
> simply to do as Greg did, and enable preemption (but interrupts are 
> still disabled), call the function tracer, then disable preemption again 
> (to match the outside preemption enabling.

Ok good. 


      reply	other threads:[~2008-08-19 14:07 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
2008-08-19 13:45       ` Steven Rostedt
2008-08-19 14:07         ` Peter Zijlstra [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=1219154869.10800.386.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).