[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160111220315.GI6344@twins.programming.kicks-ass.net>
Date: Mon, 11 Jan 2016 23:03:15 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: Ingo Molnar <mingo@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
LKML <linux-kernel@...r.kernel.org>,
Vince Weaver <vince@...ter.net>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andi Kleen <andi@...stfloor.org>, Jiri Olsa <jolsa@...hat.com>
Subject: Re: [RFC][PATCH 02/12] perf: Fix cgroup event scheduling
On Mon, Jan 11, 2016 at 11:43:40AM -0800, Stephane Eranian wrote:
> Peter,
>
> On Mon, Jan 11, 2016 at 8:25 AM, Peter Zijlstra <peterz@...radead.org> wrote:
> > There appears to be a problemin __perf_event_task_sched_in() wrt
> > cgroup event scheduling.
> >
> > The normal event scheduling order is:
> >
> > CPU pinned
> > Task pinned
> > CPU flexible
> > Task flexible
> >
> > And since perf_cgroup_sched*() only schedules the cpu context, we must
> > call this _before_ adding the task events.
> >
> I understand this but I am trying to understand why cgroup system-wide event
> would be treated differently from regular system-wide events w.r.t. task events
> here.
This patch is about making cgroup events behave similarly to regular
system-wide events.
> If I do a cgroup flexible and a task pinned, what happens?
Look at perf_event_context_sched_in(), it will first remove the
cpu-flexible and then install everything:
cpu-pinned (skipped, because that would still be present)
task-pinned (new)
cpu-flexible (re-issue, possibly truncated due to the new pinned events)
task-flexible (new)
Powered by blists - more mailing lists