]> git.baikalelectronics.ru Git - kernel.git/commit
perf: Synchronously clean up child events
authorPeter Zijlstra <peterz@infradead.org>
Fri, 15 Jan 2016 14:07:41 +0000 (16:07 +0200)
committerIngo Molnar <mingo@kernel.org>
Fri, 29 Jan 2016 07:35:35 +0000 (08:35 +0100)
commite401ca9b73ac05c5ea5578a5cf15e7e850fa3cc9
tree971eae178c1644b5f0e9aebd14fac11b5a02d9c0
parentbfaad0b90f2899c3350c46c42480cec6306f7741
perf: Synchronously clean up child events

The orphan cleanup workqueue doesn't always catch orphans, for example,
if they never schedule after they are orphaned. IOW, the event leak is
still very real. It also wouldn't work for kernel counters.

Doing it synchonously is a little hairy due to lock inversion issues,
but is made to work.

Patch based on work by Alexander Shishkin.

Suggested-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: vince@deater.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/perf_event.h
kernel/events/core.c