Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 018f2fca authored by Raghavendra Rao Ananta's avatar Raghavendra Rao Ananta Committed by Gerrit - the friendly Code Review server
Browse files

perf: Manage CPU hotplug events at core level



Currently, the perf's hotplug management is split between the
core and the PMU driver. That is, the PMU driver is responsible
for starting and stopping the perf-event counter in the cases
where the CPU is coming up and going down, respectively. However,
this approach is not scalable for the growing number of PMU drivers.
Moreover, due to partial cleanup at the perf-core, currently the
perf-events are prone to race conditions, for example between the
CPU hotplug teardown callback (perf_event_exit_cpu()) and the hrtimer
handler (perf_mux_hrtimer_handler()) that's used for multiplexing
the events.

Hence, the approach here is to achieve the hotplug management
at the perf-core level. The idea is to detach the event from the
context (perf_remove_from_context()), when the CPU is about to come
down and re-attach it back (perf_install_in_context()), when the CPU
comes back online.

The approach involves removing the logic for maintaining zombie
events (PERF_EVENT_STATE_ZOMBIE) and let the dormant list itself
carry the events whose CPUs are offline.

Change-Id: I39503d1f4b0b3937920b666a4f04875162fad3b3
Signed-off-by: default avatarRaghavendra Rao Ananta <rananta@codeaurora.org>
Signed-off-by: default avatarSwetha Chikkaboraiah <schikk@codeaurora.org>
parent 47c12907
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment