• Peter Zijlstra's avatar
    perf: Simplify/fix perf_event_enable() event scheduling · aee7dbc4
    Peter Zijlstra authored
    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: default avatarPeter 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: default avatarIngo Molnar <mingo@kernel.org>
    aee7dbc4
core.c 218 KB