Re: [PATCH v6 1/6] perf/cgroup: Reorder perf_cgroup_connect()

From: Peter Zijlstra
Date: Fri Feb 14 2020 - 12:37:56 EST


On Fri, Feb 14, 2020 at 09:11:24AM -0700, Shuah Khan wrote:
> On 2/14/20 12:51 AM, Ian Rogers wrote:
> > From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> >
> > Move perf_cgroup_connect() after perf_event_alloc(), such that we can
> > find/use the PMU's cpu context.
>
> Can you elaborate on this usage? It will helpful to know how
> this is used and what do we get from it. What were we missing
> with the way it was done before?

It says so right there. We need it after perf_event_alloc() so that we
can find/use the event's PMU cpu context.