[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190415155308.GP14281@hirez.programming.kicks-ass.net>
Date: Mon, 15 Apr 2019 17:53:08 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Stephane Eranian <eranian@...gle.com>
Cc: linux-kernel@...r.kernel.org, tglx@...utronix.de,
ak@...ux.intel.com, kan.liang@...el.com, mingo@...e.hu,
nelson.dsouza@...el.com, jolsa@...hat.com, tonyj@...e.com
Subject: Re: [PATCH v2 1/2] perf/core: add perf_ctx_resched() as global
function
On Mon, Apr 15, 2019 at 05:45:37PM +0200, Peter Zijlstra wrote:
> On Mon, Apr 08, 2019 at 10:32:51AM -0700, Stephane Eranian wrote:
> > This patch add perf_ctx_resched() a global function that can be called
> > to force rescheduling of events based on event types. The function locks
> > both cpuctx and task_ctx internally. This will be used by a subsequent patch.
>
> I took out the task_ctx and event_type arguments.
> +void perf_ctx_resched(struct perf_cpu_context *cpuctx)
> +{
> + struct perf_event_context *task_ctx = cpuctx->task_ctx;
> +
> + perf_ctx_lock(cpuctx, task_ctx);
> + ctx_resched(cpuctx, task_ctx, EVENT_ALL|EVENT_CPU);
> + perf_ctx_unlock(cpuctx, task_ctx);
> +}
Hmm... I might just rework the thing to:
perf_pmu_resched(struct pmu *pmu);
As that is what we want; esp. in the light of that whole core context
rewrite that i'm still sitting on :/
Powered by blists - more mailing lists