[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1301327368.4859.28.camel@twins>
Date: Mon, 28 Mar 2011 17:49:28 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Jiri Olsa <jolsa@...hat.com>, Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...e.hu>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH,RFC] perf: panic due to inclied cpu context task_ctx
value
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..
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists