]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit445957932b1105195bd00633378f641a7855b59e
tree0d7ebb18fa8e90c77bb860b9320f1b83c2108d52
parent7f7e55570f3c57f14362c15010aa84ed3e4881ed
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