lkml.org 
[lkml]   [2016]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@infradead.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)

\
 
 \ /
  Last update: 2016-01-11 23:41    [W:0.102 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site