lkml.org 
[lkml]   [2013]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] perf, x86: Add workaround for MEM_*_RETIRED errata BV98
On Mon, Apr 29, 2013 at 11:45:08AM -0700, Andi Kleen wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> On IvyBridge MEM_*_RETIRED can leak through to the same counter
> on the other thread. Add a dummy extra_reg to handle this case.
> The extra reg is allocated and makes sure nothing different
> runs on the same counter in the other thread.
>
> This is normally only visible when multiplexing.
>
> This patch doesn't 100% plug the hole, as the event may still get lost
> when the other CPU thread does not have an enabled counter
> (e.g. with per thread counting). However it fixes it well enough
> for the common global profiling case (e.g. perf top / perf stat -a)
> In theory it would be possible to handle the other cases
> too, but it would need far more changes.

So you're saying that if two SMT siblings count the same MEM_*_RETIRED event
(on the same counter?) events can get accounted to the wrong sibling?

And when the other sibling doesn't have (the same counter?) enabled we can
loose events?

This begs the question what happens when the sibling does have the (same?)
counter enabled but counting an all together different event; do we then still
'loose' events from the one sibling and add then to the other counter?




\
 
 \ /
  Last update: 2013-05-01 11:41    [W:0.049 / U:0.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site