]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Fix throttle logic
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 15 Feb 2011 21:26:07 +0000 (22:26 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 16 Feb 2011 12:25:29 +0000 (13:25 +0100)
commit18ae6dde218113f17393afa0b838c4be923e0b33
tree9981eaf986d477d096cdb0388e0f95a80eeb2c38
parentce25eb6a711ef9288aa692af1ded73bc186970bf
perf: Fix throttle logic

It was possible to call pmu::start() on an already running event. In
particular this lead so some wreckage as the hrtimer events would
re-initialize active timers.

This was due to throttled events being activated again by scheduling.
Scheduling in a context would add and force start events, resulting in
running events with a possible throttle status. The next tick to hit
that task will then try to unthrottle the event and call ->start() on
an already running event.

Reported-by: Jeff Moyer <jmoyer@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/perf_event.c