From a486143d54295787909673dbaee6a6b6042a3377 Mon Sep 17 00:00:00 2001 From: Raghavendra Rao Ananta Date: Fri, 19 Oct 2018 10:06:28 -0700 Subject: perf: Cancel the mux hrtimer during CPU hotplug to avoid migration The current design of hrtimers migrates the pinned timers to a different CPU upon its hotplug. However, perf-core needs to maintain the mux-hrtimers on a per CPU basis. That is, each hrtimer carries the context for that particular CPU and would lose this context if it gets migrated to a different CPU. As a result, cancel the hrtimer for the CPU that's about to go down and restart it (if required) when the perf-events are being created. Change-Id: I7a1d0456208855e3a99a7d49e59c6dae811d146e Signed-off-by: Raghavendra Rao Ananta [mojha@codeaurora.org: Resolved merge conflict and added missing `cpuctx` variable to avoid build failure] Signed-off-by: Mukesh Ojha --- include/linux/perf_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index f501b8c0de4e..efce166a9f17 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -231,7 +231,7 @@ struct pmu { int capabilities; int * __percpu pmu_disable_count; - struct perf_cpu_context * __percpu pmu_cpu_context; + struct perf_cpu_context __percpu *pmu_cpu_context; atomic_t exclusive_cnt; /* < 0: cpu; > 0: tsk */ int task_ctx_nr; int hrtimer_interval_ms; -- cgit v1.2.3