public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: John Levon <levon@movementarian.org>
To: Greg Banks <gnb@melbourne.sgi.com>
Cc: Andrew Morton <akpm@osdl.org>,
	OProfile List <oprofile-list@lists.sourceforge.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/11] oprofile: arch-independent code for stack trace sampling
Date: Tue, 9 Nov 2004 15:22:46 +0000	[thread overview]
Message-ID: <20041109152246.GD43366@compsoc.man.ac.uk> (raw)
In-Reply-To: <1100000147.1985.839.camel@hole.melbourne.sgi.com>

On Tue, Nov 09, 2004 at 10:35:48PM +1100, Greg Banks wrote:

> > oprofile is currently doing suspicious things with smp_processor_id() in
> > premptible reasons.  Is this patch compounding things?
> 
> It's not changing the contexts where smp_processor_id() is called,
> just pushing it down one level from a bunch of interrupt handlers
> to the 2 oprofile sampling functions they call.  If it was busted
> before it's no more nor less busted now.
> 
> I presume the perceived problem is that with CONFIG_PREEMPT=y the
> thread can be pre-empted onto another CPU?  If it makes everyone
> happier I can sprinkle a few preempt_disable()s around, but I'd
> prefer to do it in a subsequent patch rather than respin this.

Andrew: basically the warning is false, there is no bug in this code.

we don't want to use preempt_disable(). Instead we want some way to get
a CPU ID and then carry on in pre-emptible fashion. It's only used to
index into an array, and if we get pre-empted onto another CPU it's not
a major deal.

(Yes, this breaks with CPU hotplug, but so does the rest of OProfile and
I've yet to see a sensible API for handling this, that is a ctor/dtor
style API)

regards
john

      reply	other threads:[~2004-11-09 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-09 10:37 [PATCH 2/11] oprofile: arch-independent code for stack trace sampling Greg Banks
2004-11-09 11:05 ` Andrew Morton
2004-11-09 11:35   ` Greg Banks
2004-11-09 15:22     ` John Levon [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=20041109152246.GD43366@compsoc.man.ac.uk \
    --to=levon@movementarian.org \
    --cc=akpm@osdl.org \
    --cc=gnb@melbourne.sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sourceforge.net \
    /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