perf: Simplify/fix perf_event_enable() event scheduling
authorPeter Zijlstra <peterz@infradead.org>
Fri, 8 Jan 2016 09:45:11 +0000 (10:45 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 21 Jan 2016 17:54:22 +0000 (18:54 +0100)
commitaee7dbc45f8aa976913de9b352fa6da816f1f3cd
tree0d7ebb18fa8e90c77bb860b9320f1b83c2108d52
parent8833d0e286c12fd4456089a7a553faf4921e4b08
perf: Simplify/fix perf_event_enable() event scheduling

Like perf_enable_on_exec(), perf_event_enable() event scheduling has problems
respecting the context hierarchy when trying to schedule events (for
example, it will try and add a pinned event without first removing
existing flexible events).

So simplify it by using the new ctx_resched() call which will DTRT.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: David Ahern <dsahern@gmail.com>
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>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
kernel/events/core.c
This page took 0.025541 seconds and 5 git commands to generate.