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:Raghavendra Rao Ananta <rananta@codeaurora.org> Signed-off-by:
Swetha Chikkaboraiah <schikk@codeaurora.org>
Loading
Please register or sign in to comment