From: Peter Zijlstra <peterz@infradead.org>
To: Stephane Eranian <eranian@google.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, ming.m.lin@intel.com
Subject: Re: [PATCH] perf_event: fix slow and broken cgroup context switch code
Date: Thu, 25 Aug 2011 16:22:28 +0200 [thread overview]
Message-ID: <1314282148.27911.13.camel@twins> (raw)
In-Reply-To: <20110825135803.GA4697@quad>
On Thu, 2011-08-25 at 15:58 +0200, Stephane Eranian wrote:
> +static inline void perf_event_task_sched_in(struct task_struct *prev,
> + struct task_struct *task)
> {
> if (static_branch(&perf_sched_events))
> + __perf_event_task_sched_in(prev, task);
> }
>
> +static inline void perf_event_task_sched_out(struct task_struct *prev,
> + struct task_struct *next)
> {
> perf_sw_event(PERF_COUNT_SW_CONTEXT_SWITCHES, 1, NULL, 0);
>
> + if (static_branch(&perf_sched_events))
> + __perf_event_task_sched_out(prev, next);
> }
BTW, Ingo, is there any particular reason we have these two calls and
not a single perf_event_task_switch() call?
next prev parent reply other threads:[~2011-08-25 14:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 13:58 [PATCH] perf_event: fix slow and broken cgroup context switch code Stephane Eranian
2011-08-25 14:20 ` Peter Zijlstra
2011-08-25 14:36 ` Stephane Eranian
2011-08-25 14:42 ` Peter Zijlstra
2011-08-25 15:03 ` Stephane Eranian
2011-08-25 17:34 ` Peter Zijlstra
2011-08-25 14:22 ` Peter Zijlstra [this message]
2011-08-25 14:26 ` Peter Zijlstra
2011-08-29 14:56 ` [tip:perf/urgent] perf events: Fix " tip-bot for Stephane Eranian
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=1314282148.27911.13.camel@twins \
--to=peterz@infradead.org \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
/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