From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Cc: Paul Mackerras <paulus@samba.org>, Mike Galbraith <efault@gmx.de>,
Arjan van de Ven <arjan@infradead.org>,
Wu Fengguang <fengguang.wu@intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: [PATCH 3/9] perf_counter: kerneltop: simplify data_head read
Date: Sat, 28 Mar 2009 20:44:02 +0100 [thread overview]
Message-ID: <20090328194929.679540505@chello.nl> (raw)
In-Reply-To: 20090328194359.426029037@chello.nl
[-- Attachment #1: kerneltop-new-mmap.patch --]
[-- Type: text/plain, Size: 852 bytes --]
Now that the kernel side changed, match up again.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
---
Documentation/perf_counter/kerneltop.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
Index: linux-2.6/Documentation/perf_counter/kerneltop.c
===================================================================
--- linux-2.6.orig/Documentation/perf_counter/kerneltop.c
+++ linux-2.6/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;
}
--
next prev parent reply other threads:[~2009-03-28 19:50 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-28 19:43 [PATCH 0/9] perf_counter patches Peter Zijlstra
2009-03-28 19:44 ` [PATCH 1/9] perf_counter: unify and fix delayed counter wakeup Peter Zijlstra
2009-03-29 0:14 ` Paul Mackerras
2009-03-29 9:16 ` Peter Zijlstra
2009-03-29 9:25 ` Peter Zijlstra
2009-03-29 10:02 ` Paul Mackerras
2009-03-28 19:44 ` [PATCH 2/9] perf_counter: fix update_userpage() Peter Zijlstra
2009-03-29 0:24 ` Paul Mackerras
2009-04-02 8:50 ` Peter Zijlstra
2009-04-02 9:00 ` Peter Zijlstra
2009-04-02 9:21 ` Paul Mackerras
2009-04-02 9:28 ` Peter Zijlstra
2009-04-02 9:15 ` Paul Mackerras
2009-04-02 9:36 ` Peter Zijlstra
2009-04-02 9:58 ` Paul Mackerras
2009-04-02 10:36 ` Peter Zijlstra
2009-03-28 19:44 ` Peter Zijlstra [this message]
2009-03-28 19:44 ` [PATCH 4/9] perf_counter: executable mmap() information Peter Zijlstra
2009-03-28 19:44 ` [PATCH 5/9] perf_counter: kerneltop: parse the mmap data stream Peter Zijlstra
2009-03-28 19:44 ` [PATCH 6/9] perf_counter: powerpc: only reserve PMU hardware when we need it Peter Zijlstra
2009-03-28 19:44 ` [PATCH 7/9] perf_counter: make it possible for hw_perf_counter_init to return error codes Peter Zijlstra
2009-03-30 4:13 ` Paul Mackerras
2009-03-28 19:44 ` [PATCH 8/9] perf_counter tools: optionally scale counter values in perfstat mode Peter Zijlstra
2009-03-28 19:44 ` [PATCH 9/9] RFC perf_counter: event overlow handling Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090328194929.679540505@chello.nl \
--to=a.p.zijlstra@chello.nl \
--cc=arjan@infradead.org \
--cc=efault@gmx.de \
--cc=fengguang.wu@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox