From: tip-bot for Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulus@samba.org, hpa@zytor.com,
mingo@redhat.com, peterz@infradead.org,
xiaoguangrong@cn.fujitsu.com, tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perf/urgent] perf_event: Clean up perf_event_init_task()
Date: Thu, 1 Oct 2009 07:47:14 GMT [thread overview]
Message-ID: <tip-27f9994c50e95f3a5a81fe4c7491a9f9cffe6ec0@git.kernel.org> (raw)
In-Reply-To: <4ABC5AF9.6060808@cn.fujitsu.com>
Commit-ID: 27f9994c50e95f3a5a81fe4c7491a9f9cffe6ec0
Gitweb: http://git.kernel.org/tip/27f9994c50e95f3a5a81fe4c7491a9f9cffe6ec0
Author: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
AuthorDate: Fri, 25 Sep 2009 13:54:01 +0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Thu, 1 Oct 2009 09:30:44 +0200
perf_event: Clean up perf_event_init_task()
While at it: we can traverse ctx->group_list to get all
group leader, it should be safe since we hold ctx->mutex.
Changlog v1->v2:
- remove WARN_ON_ONCE() according to Peter Zijlstra's suggestion
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <4ABC5AF9.6060808@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/perf_event.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/kernel/perf_event.c b/kernel/perf_event.c
index e50543d..e491fb0 100644
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4767,9 +4767,7 @@ int perf_event_init_task(struct task_struct *child)
* We dont have to disable NMIs - we are only looking at
* the list, not manipulating it:
*/
- list_for_each_entry_rcu(event, &parent_ctx->event_list, event_entry) {
- if (event != event->group_leader)
- continue;
+ list_for_each_entry(event, &parent_ctx->group_list, group_entry) {
if (!event->attr.inherit) {
inherited_all = 0;
next prev parent reply other threads:[~2009-10-01 7:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-22 8:47 [PATCH] perf_counter: cleanup for __perf_event_sched_in() Xiao Guangrong
2009-09-22 9:20 ` Paul Mackerras
2009-09-22 9:27 ` Xiao Guangrong
2009-09-22 9:32 ` [PATCH v2] " Xiao Guangrong
2009-09-22 9:39 ` [PATCH] " Paul Mackerras
2009-09-22 11:17 ` Peter Zijlstra
2009-09-23 2:45 ` Xiao Guangrong
2009-09-23 3:32 ` Paul Mackerras
2009-09-23 8:10 ` [PATCH 1/2] perf_counter: cleanup for __perf_event_sched_*() Xiao Guangrong
2009-09-23 8:13 ` [PATCH 2/2] perf_counter: optimize for perf_event_init_task() Xiao Guangrong
2009-09-23 8:43 ` Peter Zijlstra
2009-09-25 1:23 ` Xiao Guangrong
2009-09-23 8:40 ` [PATCH 1/2] perf_counter: cleanup for __perf_event_sched_*() Peter Zijlstra
2009-09-25 1:22 ` Xiao Guangrong
2009-09-25 5:51 ` [PATCH 1/2 v2] perf_counter: fix " Xiao Guangrong
2009-09-25 5:54 ` [PATCH 2/2 v2] optimize for perf_event_init_task() Xiao Guangrong
2009-09-25 8:55 ` Peter Zijlstra
2009-10-01 7:31 ` Ingo Molnar
2009-10-01 7:47 ` tip-bot for Xiao Guangrong [this message]
2009-09-25 8:55 ` [PATCH 1/2 v2] perf_counter: fix for __perf_event_sched_*() Peter Zijlstra
2009-10-01 7:46 ` [tip:perf/urgent] perf_event: Fix event group handling in __perf_event_sched_*() tip-bot for Xiao Guangrong
2009-09-22 11:12 ` [PATCH] perf_counter: cleanup for __perf_event_sched_in() 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=tip-27f9994c50e95f3a5a81fe4c7491a9f9cffe6ec0@git.kernel.org \
--to=xiaoguangrong@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome