lkml.org 
[lkml]   [2011]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH,RFC] perf: panic due to inclied cpu context task_ctx value
From
Date
On Mon, 2011-03-28 at 16:57 +0200, Peter Zijlstra wrote:
> >
> > Wait... Yes, we have to clear ctx->is_active, otherwise we break, say,
> > perf_install_in_context().
> >
> > But if we clear ->is_active we break perf_event_enable(). Suppose we
> > are doing ioctl(PERF_EVENT_IOC_DISABLE) + ioctl(PERF_EVENT_IOC_ENABLE).
> > PERF_EVENT_IOC_DISABLE can sched_out the last event, but _IOC_ENABLE
> > treats ctx->is_active == F as "it is not running".
>
> Right, same for the tick, if say we can only schedule 1 event at a time
> and we close the 1 event that is active, the tick will not rotate a new
> event in.

Another fun race, suppose we do properly remove task_ctx and is_active,
but then the task gets scheduled back in before free_event() gets around
to disabling the jump_label..




\
 
 \ /
  Last update: 2011-03-28 17:53    [from the cache]
©2003-2011 Jasper Spaans