lkml.org 
[lkml]   [2019]   [Apr]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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 :/

\
 
 \ /
  Last update: 2019-04-15 17:54    [W:0.028 / U:10.172 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site