Re: [PATCH 5/7] perf: cache perf_event_groups_first for cgroups

From: Peter Zijlstra
Date: Mon Jul 08 2019 - 12:51:33 EST


On Mon, Jul 08, 2019 at 06:50:34PM +0200, Peter Zijlstra wrote:
> On Mon, Jul 01, 2019 at 11:59:53PM -0700, Ian Rogers wrote:
> > @@ -3511,7 +3550,12 @@ static int visit_groups_merge(struct perf_event_context *ctx,
> > min_heapify_all(&heap);
> >
> > while (heap.num_elements > 0) {
> > - ret = func(ctx, cpuctx, heap.storage[0], data);
> > + if (is_pinned)
> > + ret = pinned_sched_in(ctx, cpuctx, heap.storage[0]);
> > + else
> > + ret = flexible_sched_in(ctx, cpuctx, heap.storage[0],
> > + data);
> > +
> > if (ret)
> > return ret;
> >
>
> You can actually merge those two functions; see merge_sched_in() in the
> below patch:
>
> https://lkml.kernel.org/r/20181010104559.GO5728@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

And this change is again unrelated to the one the Changelog mentions.