]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
perf_counter: kerneltop: simplify data_head read
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Mon, 30 Mar 2009 17:07:04 +0000 (19:07 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 6 Apr 2009 07:30:37 +0000 (09:30 +0200)
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>
Documentation/perf_counter/kerneltop.c

index fda1438365dc09747eff56d824907b596743dcdb..2779c57ad4baf8613a02e9a983f2c5fb7b7be892 100644 (file)
@@ -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;
 }