Re: [patch 05/24] perfmon: X86 generic code (x86)

From: Andi Kleen
Date: Thu Nov 27 2008 - 08:39:20 EST


> What about a thread doing this and another one in the middle of read the buffer?

I assume that uses locks. Locking between threads is easy.

>
> Or what about a thread trying to reset the buffer while you're processing an PMU
> interrupt on another CPU. I know each buffer is per-CPU, but that does not
> prevent two threads for trying to operate on it at the same time from
> different CPUs.

That happens per CPU.

-Andi

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