[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-b5b7e234c3d14eb614998ce5a96719baf146c71c@git.kernel.org>
Date: Wed, 1 Apr 2009 10:13:07 GMT
From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
To: linux-tip-commits@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, paulus@...ba.org, hpa@...or.com,
mingo@...hat.com, a.p.zijlstra@...llo.nl, tglx@...utronix.de,
mingo@...e.hu
Subject: [tip:perfcounters/core] perf_counter: kerneltop: simplify data_head read
Commit-ID: b5b7e234c3d14eb614998ce5a96719baf146c71c
Gitweb: http://git.kernel.org/tip/b5b7e234c3d14eb614998ce5a96719baf146c71c
Author: Peter Zijlstra <a.p.zijlstra@...llo.nl>
AuthorDate: Mon, 30 Mar 2009 19:07:04 +0200
Committer: Ingo Molnar <mingo@...e.hu>
CommitDate: Wed, 1 Apr 2009 11:33:33 +0200
perf_counter: kerneltop: simplify data_head read
Now that the kernel side changed, match up again.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Acked-by: Paul Mackerras <paulus@...ba.org>
LKML-Reference: <20090330171023.327144324@...llo.nl>
Signed-off-by: Ingo Molnar <mingo@...e.hu>
---
Documentation/perf_counter/kerneltop.c | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/Documentation/perf_counter/kerneltop.c b/Documentation/perf_counter/kerneltop.c
index fda1438..2779c57 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;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists