diff options
author | Peter Zijlstra (Intel) <peterz@infradead.org> | 2015-01-27 11:53:12 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-02-04 08:07:11 +0100 |
commit | 8f95b435b62522aed3381aaea920de8d09ccabf3 (patch) | |
tree | 8d951499c8f225c29ccf7fc54286493d2157c9dc /kernel/backtracetest.c | |
parent | f63a8daa5812afef4f06c962351687e1ff9ccb2b (diff) | |
download | linux-8f95b435b62522aed3381aaea920de8d09ccabf3.tar.bz2 |
perf: Fix move_group() order
Jiri reported triggering the new WARN_ON_ONCE in event_sched_out over
the weekend:
event_sched_out.isra.79+0x2b9/0x2d0
group_sched_out+0x69/0xc0
ctx_sched_out+0x106/0x130
task_ctx_sched_out+0x37/0x70
__perf_install_in_context+0x70/0x1a0
remote_function+0x48/0x60
generic_exec_single+0x15b/0x1d0
smp_call_function_single+0x67/0xa0
task_function_call+0x53/0x80
perf_install_in_context+0x8b/0x110
I think the below should cure this; if we install a group leader it
will iterate the (still intact) group list and find its siblings and
try and install those too -- even though those still have the old
event->ctx -- in the new ctx.
Upon installing the first group sibling we'd try and schedule out the
group and trigger the above warn.
Fix this by installing the group leader last, installing siblings
would have no effect, they're not reachable through the group lists
and therefore we don't schedule them.
Also delay resetting the state until we're absolutely sure the events
are quiescent.
Reported-by: Jiri Olsa <jolsa@redhat.com>
Reported-by: vincent.weaver@maine.edu
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20150126162639.GA21418@twins.programming.kicks-ass.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/backtracetest.c')
0 files changed, 0 insertions, 0 deletions