Re: [PATCH,RFC] perf: panic due to inclied cpu context task_ctxvalue

From: Oleg Nesterov
Date: Sat Mar 26 2011 - 14:58:46 EST


On 03/26, Peter Zijlstra wrote:
>
> On Sat, 2011-03-26 at 18:35 +0100, Oleg Nesterov wrote:
> >
> > but probably we also need update_context_time().
>
> It looks like event_sched_out() relies on up-to-date ctx->time through
> perf_event_time() and most call-paths leading to event_sched_out() do
> indeed seem to update the ctx time, all except the move_group branch in
> perf_event_open() afaict.

OK, thanks...

> Sadly the reproducer doesn't seem to trigger the issue at all, its still
> running on a plain -tip kernel.

This test-case is not "perfect", the task should change its CPU after
it closes the last perf_even_fd and before it exits...

But to me, the main question is: I do not understand how this test-case
can ever trigger the problem with HAVE_JUMP_LABEL. But it does.

I didn't try to reproduce, my gcc is old and not-CC_HAVE_ASM_GOTO.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/