[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190708165034.GI3419@hirez.programming.kicks-ass.net>
Date: Mon, 8 Jul 2019 18:50:34 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Namhyung Kim <namhyung@...nel.org>,
linux-kernel@...r.kernel.org,
Kan Liang <kan.liang@...ux.intel.com>,
Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH 5/7] perf: cache perf_event_groups_first for cgroups
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@hirez.programming.kicks-ass.net
Powered by blists - more mailing lists