lkml.org 
[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] perf_counter: optimize context switch between identical inherited contexts
From
Date
On Fri, 2009-05-22 at 14:27 +1000, Paul Mackerras wrote:
> + next_ctx = next->perf_counter_ctxp;
> + if (next_ctx && context_equiv(ctx, next_ctx)) {
> + task->perf_counter_ctxp = next_ctx;
> + next->perf_counter_ctxp = ctx;
> + ctx->task = next;
> + next_ctx->task = task;
> + return;
> + }

Ingo just pointed out that there is nothing there to close the race with
attaching a counter.

That is, you could end up attaching your counter to the wrong task.



\
 
 \ /
  Last update: 2009-05-22 15:49    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site