Re: [RFC][PATCH 0/6] perf: x86 RDPMC and RDTSC support

From: Vince Weaver
Date: Fri Dec 16 2011 - 17:36:42 EST


On Mon, 21 Nov 2011, Peter Zijlstra wrote:

> These few patches implement x86 RDPMC support and add an extention to the self
> monitoring data to also allow additional time updates using userspace TSC reads.
>
> There's a few loose ends, but it mostly seems to work.

I've finally had time to apply and test these patches.

Firstly, the documentation was a bit sparse (though I guess that's OK for
an RFC patch). Is it possible to read multiple counters at once with this
interface, i.e. using FORMAT_GROUP?

Also, am I correct that the counters are set to always counting, so you
always have to do a rdpmc() before and a rdpmc() after?

I ran some benchmarks, the results can be found here:
http://web.eecs.utk.edu/~vweaver1/projects/perf-events/benchmarks/rdtsc_overhead/

I used the mmap_read_self() routine from your example as the "read"
performance that I measured.

If start/stop are truly unnecessary when run with your patch then the
"total" results shift in your favor. Otherwise perfmon2 and perfctr still
win the self-monitoring overhead race by a lot.

Vince

--
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/