[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875zqcx8yx.fsf@ashishki-desk.ger.corp.intel.com>
Date: Wed, 15 May 2019 14:17:42 +0300
From: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>, mingo@...nel.org
Cc: linux-kernel@...r.kernel.org, acme@...nel.org, jolsa@...hat.com,
songliubraving@...com, eranian@...gle.com, tglx@...utronix.de,
alexey.budankov@...ux.intel.com, mark.rutland@....com,
megha.dey@...el.com, frederic@...nel.org,
alexander.shishkin@...ux.intel.com
Subject: Re: [RFC][PATCH] perf: Rewrite core context handling
Peter Zijlstra <peterz@...radead.org> writes:
> + // XXX think about exclusive
> + if ((pmu->capabilities & PERF_PMU_CAP_EXCLUSIVE) && group_leader) {
> + err = -EBUSY;
> + goto err_context;
> }
This used to be a problem, because group_leader could have caused
move_group, which could then potentially violate the
exclusive_event_installable() half way through installing siblings onto
the new context (gctx -> ctx). But, with the proposed new order, it's
the same context (ctx), but different epc, which is not a problem; any
potential violations would be caught by
if (!exclusive_event_installable(event, ctx))
that preceeds the move_group block.
It also makes sense that exclusive_event_installable() looks on
ctx->event_list and not epc lists for this exact reason.
In retrospect, we can probably also fix this better in the current code
like:
if (!exclusive_event_installable(event, ctx) ||
!exclusive_event_installable(event, gctx)) /* do -EBUSY */
and get rid of the above restriction to allow grouping "exclusive"
events.
Regards,
--
Alex
Powered by blists - more mailing lists