aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms
diff options
context:
space:
mode:
authorEric B Munson <emunson@mgebm.net>2011-04-15 08:12:30 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-18 13:08:23 +1000
commit86c74ab317c1ef4d37325e0d7ca8a01a796b0bd7 (patch)
tree49afb7aae9c12b0cd0361b996a9b9e630a25ea63 /arch/powerpc/platforms
parent09597cfe93d3cc2c6e064a3ead5956b882511560 (diff)
powerpc/perf_event: Skip updating kernel counters if register value shrinks
Because of speculative event roll back, it is possible for some event coutners to decrease between reads on POWER7. This causes a problem with the way that counters are updated. Delta calues are calculated in a 64 bit value and the top 32 bits are masked. If the register value has decreased, this leaves us with a very large positive value added to the kernel counters. This patch protects against this by skipping the update if the delta would be negative. This can lead to a lack of precision in the coutner values, but from my testing the value is typcially fewer than 10 samples at a time. Signed-off-by: Eric B Munson <emunson@mgebm.net> Cc: stable@kernel.org Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms')
0 files changed, 0 insertions, 0 deletions