From: Peter Zijlstra Date: Thu, 2 Apr 2009 09:12:04 +0000 (+0200) Subject: perf_counter: update mmap() counter read X-Git-Tag: v2.6.31-rc1~383^2~408 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92f22a3865abe87eea2609a6f8e5be5123f7ce4f;p=pandora-kernel.git perf_counter: update mmap() counter read Paul noted that we don't need SMP barriers for the mmap() counter read because its always on the same cpu (otherwise you can't access the hw counter anyway). So remove the SMP barriers and replace them with regular compiler barriers. Further, update the comment to include a race free method of reading said hardware counter. The primary change is putting the pmc_read inside the seq-loop, otherwise we can still race and read rubbish. Noticed-by: Paul Mackerras Signed-off-by: Peter Zijlstra Cc: Corey Ashford Orig-LKML-Reference: <20090402091319.577951445@chello.nl> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed