Skip to content

Commit

Permalink
perf: Fix event->ctx locking
Browse files Browse the repository at this point in the history
commit f63a8daa5812afef4f06c962351687e1ff9ccb2b upstream.

There have been a few reported issues wrt. the lack of locking around
changing event->ctx. This patch tries to address those.

It avoids the whole rwsem thing; and while it appears to work, please
give it some thought in review.

What I did fail at is sensible runtime checks on the use of
event->ctx, the RCU use makes it very hard.

Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: Paul E. McKenney <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Linus Torvalds <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
[bwh: Backported to 3.2:
 - We don't have perf_pmu_migrate_context()
 - Adjust context]
Signed-off-by: Ben Hutchings <[email protected]>

Change-Id: I5bab713034e960fad467637e98e914440de5666d
Signed-off-by: Francisco Franco <[email protected]>
  • Loading branch information
Peter Zijlstra authored and franciscofranco committed Dec 9, 2017
1 parent b2f94b2 commit 735e2a6
Showing 1 changed file with 201 additions and 34 deletions.
Loading

0 comments on commit 735e2a6

Please sign in to comment.