]> Git Repo - linux.git/commit
perf: Fix perf_enable_on_exec() event scheduling
authorPeter Zijlstra <[email protected]>
Fri, 8 Jan 2016 09:01:18 +0000 (10:01 +0100)
committerIngo Molnar <[email protected]>
Thu, 21 Jan 2016 17:54:20 +0000 (18:54 +0100)
commit3e349507d12de93b08b0aa814fc2aa0dee91c5ba
tree8facf49d1fe8af945ff671f49fb8e43abf99e9ae
parent5947f6576e2edee1189b00bf5b2a3f2c653caa6b
perf: Fix perf_enable_on_exec() event scheduling

There are two problems with the current perf_enable_on_exec() event
scheduling:

  - the newly enabled events will be immediately scheduled
    irrespective of their ctx event list order.

  - there's a hole in the ctx->lock between scheduling the events
    out and putting them back on.

Esp. the latter issue is a real problem because a hole in event
scheduling leaves the thing in an observable inconsistent state,
confusing things.

Fix both issues by first doing the enable iteration and at the end,
when there are newly enabled events, reschedule the ctx in one go.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Vince Weaver <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
kernel/events/core.c
This page took 0.050272 seconds and 4 git commands to generate.