lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 28 Aug 2006 08:24:28 -0700
From:	Stephane Eranian <eranian@....hp.com>
To:	Andrew Morton <akpm@...l.org>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 7/18] 2.6.17.9 perfmon2 patch for review: PMU interruption support

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@...nkl.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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ