perf_counter: Simplify and fix task migration counting
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Fri, 19 Jun 2009 11:22:51 +0000 (13:22 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 19 Jun 2009 11:43:12 +0000 (13:43 +0200)
commite5289d4a181fb6c0b7a7607649af2ffdc491335c
tree6c9e9ab46a29c538e4c505d3d3cd135265db08a2
parentf5970550d5ccf90453cbd7d260370ea99d1f6513
perf_counter: Simplify and fix task migration counting

The task migrations counter was causing rare and hard to decypher
memory corruptions under load. After a day of debugging and bisection
we found that the problem was introduced with:

  3f731ca: perf_counter: Fix cpu migration counter

Turning them off fixes the crashes. Incidentally, the whole
perf_counter_task_migration() logic can be done simpler as well,
by injecting a proper sw-counter event.

This cleanup also fixed the crashes. The precise failure mode is
not completely clear yet, but we are clearly not unhappy about
having a fix ;-)

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
include/linux/perf_counter.h
kernel/perf_counter.c
kernel/sched.c