mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@hpl.hp.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 7/18] 2.6.17.9 perfmon2 patch for review: PMU interruption support
Date: Mon, 28 Aug 2006 08:24:28 -0700	[thread overview]
Message-ID: <20060828152428.GE20394@frankl.hpl.hp.com> (raw)
In-Reply-To: <20060823154057.4d6d444b.akpm@osdl.org>

Andrew,

I am slowly going through your excellent feedback and I am making
the changes suggested. I will reply to all your questions.

On Wed, Aug 23, 2006 at 03:40:57PM -0700, Andrew Morton wrote:
> On Wed, 23 Aug 2006 01:05:58 -0700
> Stephane Eranian <eranian@frankl.hpl.hp.com> wrote:
> 
> > ...
> >
> > +irqreturn_t pfm_interrupt_handler(int irq, void *arg, struct pt_regs *regs)
> > +{
> > +	u64 start_cycles, total_cycles;
> > +
> > +	get_cpu();
> > +
> > +	start_cycles = pfm_arch_get_itc();
> > +
> > +	__pfm_interrupt_handler(regs);
> > +
> > +	total_cycles = pfm_arch_get_itc();
> > +
> > +	__get_cpu_var(pfm_stats).pfm_ovfl_intr_cycles += total_cycles - start_cycles;
> > +
> > +	put_cpu_no_resched();
> > +	return IRQ_HANDLED;
> > +}
> 
> If this code is only ever called from interrupt context then I suspect the
> get_cpu() is not needed.  __get_cpu_var() requires that preemption be
> disabled (so we cannot wander over to a different CPU midway) but IRQ
> code doesn't get preempted.

Yes, this function is ONLY called on PMU interrupt. I will remove the useless
get_cpu()/put_cpu() code then.

Thanks.

-- 

-Stephane

      reply	other threads:[~2006-08-28 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-23  8:05 Stephane Eranian
2006-08-23 22:40 ` Andrew Morton
2006-08-28 15:24   ` Stephane Eranian [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=20060828152428.GE20394@frankl.hpl.hp.com \
    --to=eranian@hpl.hp.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®