summaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-03-30 19:07:04 +0200
committerIngo Molnar <mingo@elte.hu>2009-04-06 09:30:37 +0200
commit195564390210977954fe4ef45b39cdee34f41b59 (patch)
tree4587f60a6c5ca5f7f70b299f3ed6cc234299c089 /Documentation/perf_counter
parent38ff667b321b00f5e6830e93fb4ab11a653a2920 (diff)
perf_counter: kerneltop: simplify data_head read
Now that the kernel side changed, match up again. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Acked-by: Paul Mackerras <paulus@samba.org> Orig-LKML-Reference: <20090330171023.327144324@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter')
-rw-r--r--Documentation/perf_counter/kerneltop.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c
index fda1438365d..2779c57ad4b 100644
--- a/Documentation/perf_counter/kerneltop.c
+++ b/Documentation/perf_counter/kerneltop.c
@@ -1125,22 +1125,10 @@ struct mmap_data {
static unsigned int mmap_read_head(struct mmap_data *md)
{
struct perf_counter_mmap_page *pc = md->base;
- unsigned int seq, head;
-
-repeat:
- rmb();
- seq = pc->lock;
-
- if (unlikely(seq & 1)) {
- cpu_relax();
- goto repeat;
- }
+ int head;
head = pc->data_head;
-
rmb();
- if (pc->lock != seq)
- goto repeat;
return head;
}