mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v3 0/2] perf/core: rcu fixes
@ 2015-11-12 10:00 Stephane Eranian
  2015-11-12 10:00 ` [PATCH v3 1/2] perf/core: fix RCU problem with cgroup context switching code Stephane Eranian
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Stephane Eranian @ 2015-11-12 10:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: acme, peterz, mingo, ak, edumazet


This short patch series fixes some issues with RCU locking in the generic
perf layer.

Patch 1 fixes cgroup switching rcu issues related to the fact that
perf_cgroup_sched_out() and perf_cgroup_sched_in() were missing some
rcu read lock to protect the reference to the cgroup. Consequently,
we moved the rcu readlock out of perf_cgroup_switch() to avoid double
calls.

Patch 2 reinforces the testing for the rcu locking in perf cgorup code.
Either we have to hold the rcu read lock or we must have the ctx->lock
which guarantees the task cannot leave the cgroup.

Thanks to Peter and Eric from their suggestions on how to fix this correctly.

Stephane Eranian (2):
  perf/core: fix RCU problem with cgroup context switching code
  perf/core: robustify perf_cgroup_from_task rcu checks

 arch/x86/kernel/cpu/perf_event_intel_cqm.c |  2 +-
 include/linux/perf_event.h                 |  6 ++++--
 kernel/events/core.c                       | 31 ++++++++++++++++++++----------
 3 files changed, 26 insertions(+), 13 deletions(-)

-- 
2.5.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-11-23 16:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 10:00 [PATCH v3 0/2] perf/core: rcu fixes Stephane Eranian
2015-11-12 10:00 ` [PATCH v3 1/2] perf/core: fix RCU problem with cgroup context switching code Stephane Eranian
2015-11-23 16:16   ` [tip:perf/core] perf/core: Fix " tip-bot for Stephane Eranian
2015-11-12 10:00 ` [PATCH v3 2/2] perf/core: robustify perf_cgroup_from_task rcu checks Stephane Eranian
2015-11-23 16:17   ` [tip:perf/core] perf/core: Robustify the perf_cgroup_from_task() RCU checks tip-bot for Stephane Eranian
2015-11-12 10:32 ` [PATCH v3 0/2] perf/core: rcu fixes Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®