public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Paul Mackerras <paulus@samba.org>
Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>,
	Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] perf_counter: cleanup for __perf_event_sched_in()
Date: Tue, 22 Sep 2009 13:17:10 +0200	[thread overview]
Message-ID: <1253618230.7695.28.camel@twins> (raw)
In-Reply-To: <19128.39768.149110.673711@cargo.ozlabs.ibm.com>

On Tue, 2009-09-22 at 19:39 +1000, Paul Mackerras wrote:
> Xiao Guangrong writes:
> 
> > It must be a group leader if event->attr.pinned is "1"
> 
> Actually, looking at this more closely, it has to be a group leader
> anyway since it's at the top level of ctx->group_list.  In fact I see
> four places where we do:
> 
> 		list_for_each_entry(event, &ctx->group_list, group_entry) {
> 			if (event == event->group_leader)
> 				...
> 
> or the equivalent, three of which appear to have been introduced by
> afedadf2 ("perf_counter: Optimize sched in/out of counters") back in
> May by Peter Z.
> 
> As far as I can see the if () is superfluous in each case (a singleton
> event will be a group of 1 and will have its group_leader pointing to
> itself).  Peter, do you agree or have I missed something?

/me kicks those neurons back to work..

Ah, yes, I think you're right, the second hunk of afedadf2 is a
pessimisation due to the extra branch.



  reply	other threads:[~2009-09-22 11:17 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 [this message]
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:perf/urgent] perf_event: Clean up perf_event_init_task() tip-bot for Xiao Guangrong
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=1253618230.7695.28.camel@twins \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    --cc=xiaoguangrong@cn.fujitsu.com \
    /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