From: Frederic Weisbecker Date: Sat, 20 Apr 2013 13:48:22 +0000 (+0200) Subject: perf: Kick full dynticks CPU if events rotation is needed X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=12351ef8f9f2226636b00324d841d9c5069d80bc;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git perf: Kick full dynticks CPU if events rotation is needed Kick the current CPU's tick by sending it a self IPI when an event is queued on the rotation list and it is the first element inserted. This makes sure that perf_event_task_tick() works on full dynticks CPUs. Signed-off-by: Frederic Weisbecker Cc: Chris Metcalf Cc: Christoph Lameter Cc: Geoff Levand Cc: Gilad Ben Yossef Cc: Hakan Akkan Cc: Ingo Molnar Cc: Kevin Hilman Cc: Li Zhong Cc: Oleg Nesterov Cc: Paul E. McKenney Cc: Paul Gortmaker Cc: Peter Zijlstra Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Stephane Eranian Cc: Jiri Olsa --- diff --git a/kernel/events/core.c b/kernel/events/core.c index b0cd86501c30..75b58bb75b32 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -655,8 +656,12 @@ static void perf_pmu_rotate_start(struct pmu *pmu) WARN_ON(!irqs_disabled()); - if (list_empty(&cpuctx->rotation_list)) + if (list_empty(&cpuctx->rotation_list)) { + int was_empty = list_empty(head); list_add(&cpuctx->rotation_list, head); + if (was_empty) + tick_nohz_full_kick(); + } } static void get_ctx(struct perf_event_context *ctx)