Skip to content

Commit

Permalink
perf_counter: kerneltop: simplify data_head read
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Apr 6, 2009
1 parent 38ff667 commit 1955643
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions Documentation/perf_counter/kerneltop.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 1955643

Please sign in to comment.