aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-03-30 13:07:04 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-06 03:30:37 -0400
commit195564390210977954fe4ef45b39cdee34f41b59 (patch)
tree4587f60a6c5ca5f7f70b299f3ed6cc234299c089
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>
-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 fda1438365dc..2779c57ad4ba 100644
--- a/Documentation/perf_counter/kerneltop.c
+++ b/Documentation/perf_counter/kerneltop.c
@@ -1125,22 +1125,10 @@ struct mmap_data {
1125static unsigned int mmap_read_head(struct mmap_data *md) 1125static unsigned int mmap_read_head(struct mmap_data *md)
1126{ 1126{
1127 struct perf_counter_mmap_page *pc = md->base; 1127 struct perf_counter_mmap_page *pc = md->base;
1128 unsigned int seq, head; 1128 int head;
1129
1130repeat:
1131 rmb();
1132 seq = pc->lock;
1133
1134 if (unlikely(seq & 1)) {
1135 cpu_relax();
1136 goto repeat;
1137 }
1138 1129
1139 head = pc->data_head; 1130 head = pc->data_head;
1140
1141 rmb(); 1131 rmb();
1142 if (pc->lock != seq)
1143 goto repeat;
1144 1132
1145 return head; 1133 return head;
1146} 1134}