public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Levon <levon@movementarian.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Mike Kravetz <kravetz@us.ibm.com>,
	phil.el@wanadoo.fr, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org,
	oprofile-list@lists.sourceforge.net
Subject: Re: oprofile can cause an NMI to schedule (was: [RT] scheduling and oprofile)
Date: Tue, 24 Oct 2006 13:46:50 +0100	[thread overview]
Message-ID: <20061024124650.GA2668@totally.trollied.org> (raw)
In-Reply-To: <1161656674.13276.17.camel@localhost.localdomain>

On Mon, Oct 23, 2006 at 10:24:34PM -0400, Steven Rostedt wrote:

> > caller is rt_mutex_slowlock+0x156/0x1dd
> >  [<c032051a>] schedule+0x65/0xd2 (8)
> >  [<c0321338>] rt_mutex_slowlock+0x156/0x1dd (12)
> >  [<c032142a>] rt_mutex_lock+0x24/0x28 (72)
> >  [<c0134904>] rt_down_read+0x38/0x3b (20)
> >  [<c0322a89>] do_page_fault+0xe3/0x52d (12)
> >  [<c03229a6>] do_page_fault+0x0/0x52d (76)
> >  [<c01033bb>] error_code+0x4f/0x54 (8)
> >  [<c01ce6d0>] __copy_from_user_ll+0x55/0x7c (44)
> >  [<f89be7ef>] dump_user_backtrace+0x2e/0x56 [oprofile] (24)
> >  [<c0134869>] rt_up_read+0x3e/0x41 (20)
> >  [<f89be864>] x86_backtrace+0x4a/0x5a [oprofile] (20)
> >  [<f89bd53a>] oprofile_add_sample+0x73/0x89 [oprofile] (20)
> >  [<f89beea3>] athlon_check_ctrs+0x22/0x4a [oprofile] (32)
> >  [<f89be8c5>] nmi_callback+0x18/0x1b [oprofile] (28)
> >  [<c01041ff>] do_nmi+0x24/0x33 (12)
> >  [<c0103462>] nmi_stack_correct+0x1d/0x22 (16)
> > 
> > It seems strange to me that oprofile would be calling
> > '__copy_from_user_ll' in this context.  I can see why the
> > changes made for RT locking expose this.  But, doesn't this
> > issue also exist on non-RT (default) kernels?  What happens
> > when we generate a page fault in this context on non-RT kernels?
> > 
> 
> As Mike has pointed out here, oprofile _can_ cause the nmi to schedule.

in_atomic() is supposed to be true in this context, so the test in
do_page_fault() catches it.

john

  reply	other threads:[~2006-10-24 12:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-23 21:23 [RT] scheduling and oprofile Mike Kravetz
2006-10-24  2:24 ` oprofile can cause an NMI to schedule (was: [RT] scheduling and oprofile) Steven Rostedt
2006-10-24 12:46   ` John Levon [this message]
2006-10-24 12:54     ` Steven Rostedt
2006-10-25 18:58       ` Mike Kravetz
2006-10-25 19:52         ` Lee Revell

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=20061024124650.GA2668@totally.trollied.org \
    --to=levon@movementarian.org \
    --cc=kravetz@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=oprofile-list@lists.sourceforge.net \
    --cc=phil.el@wanadoo.fr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox