All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	ming.m.lin@intel.com, Oleg Nesterov <oleg@redhat.com>,
	Jiri Olsa <jolsa@redhat.com>
Subject: Re: [PATCH] perf_event: fix slow and broken cgroup context switch code
Date: Thu, 25 Aug 2011 16:36:42 +0200	[thread overview]
Message-ID: <CABPqkBTnrQRNnAz6Z0Nk+oBczDD4+-NLDtb_o3aMfc11SMe7nw@mail.gmail.com> (raw)
In-Reply-To: <1314282021.27911.12.camel@twins>

On Thu, Aug 25, 2011 at 4:20 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, 2011-08-25 at 15:58 +0200, Stephane Eranian wrote:
>> +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);
>>
>> -       __perf_event_task_sched_out(task, next);
>> +       if (static_branch(&perf_sched_events))
>> +               __perf_event_task_sched_out(prev, next);
>>  }
>
> Right, so the reason we removed the static branch from there is
>
>  lkml.kernel.org/r/20110324164436.GC1930@jolsa.brq.redhat.com
>
> now I think the series 075e0b0085 to 64ce312618e should have cured that
> problem, and adding the static_branch() is now safe again. But there's
> no mention of any of this in the Changelog.
>
I realized I did not talk about the static_branch() change after I had
clicked on
Send. But to me, this looks natural to have the static branch in the ctxsw out
routine. This has to be symmetrical with ctxsw in . The static branch is about
avoiding perf ctxsw when there is no need for it, i.e., no per-thread
nor per-cgroup
events.

  reply	other threads:[~2011-08-25 14:36 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 [this message]
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
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=CABPqkBTnrQRNnAz6Z0Nk+oBczDD4+-NLDtb_o3aMfc11SMe7nw@mail.gmail.com \
    --to=eranian@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=mingo@elte.hu \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.