Re: [PATCH 7/18] 2.6.17.9 perfmon2 patch for review: PMU interruption support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 23 Aug 2006 01:05:58 -0700
Stephane Eranian <[email protected]> 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.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux