Re: [generalized cache events] Re: [PATCH 1/1] perf tools: Addmissing user space support for config1/config2
From: Andi Kleen
Date: Mon Apr 25 2011 - 15:40:59 EST
> Sure, but who cares? So your period isn't exactly what you specified,
> but the effective period will have an average and a fairly small stdev
> (assuming the initial period is much larger than the relatively few
> cycles it takes to arm the PEBS assist), therefore you still get a
> fairly uniform spread.
The skid is not uniform and not necessarily random unfortunately,
and difficult to correct in a standard way.
> I don't much get the obsession with precision here, its all a statistics
> game anyway.
If you want to make your code faster it's often important to figure
out what exactly is slow.
One example of this we had recently in the kernel:
function accesses three global objects. Scalability tanks when the test is
run with more CPUs. Now the hit is near the three memory accesses. Which one
is the one that is actually bouncing cache lines?
The CPU executes them all in parallel so it's hard to tell. It's
all in the out of order reordering window.
PEBS (e.g. the memory latency event) can give you some information about
which memory access is to blame with the right events, but it's not
using the RIP.
The generic events won't help with that, because they're still RIP
based, which is not accurate.
> Similarly all this precision wanking isn't _that_ important, the big
> fish clearly stand out, its only when you start shaving off the last few
> cycles that all that really comes in handy, before that its mostly: ooh
> thinking is hard, lets go shopping.
I wish it was that easy.
In the example above it's about scaling or not scaling, which is
definitely not the last cycle, but more a life-and-death
"is the workload feasible on this machine or not" question.
-Andi
--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only
--
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/