Commit-ID: 12351ef8f9f2226636b00324d841d9c5069d80bc Gitweb: http://git.kernel.org/tip/12351ef8f9f2226636b00324d841d9c5069d80bc Author: Frederic Weisbecker <fweisbec@xxxxxxxxx> AuthorDate: Sat, 20 Apr 2013 15:48:22 +0200 Committer: Frederic Weisbecker <fweisbec@xxxxxxxxx> CommitDate: Mon, 22 Apr 2013 19:59:37 +0200 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 <fweisbec@xxxxxxxxx> Cc: Chris Metcalf <cmetcalf@xxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Geoff Levand <geoff@xxxxxxxxxxxxx> Cc: Gilad Ben Yossef <gilad@xxxxxxxxxxxxx> Cc: Hakan Akkan <hakanakkan@xxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Kevin Hilman <khilman@xxxxxxxxxx> Cc: Li Zhong <zhong@xxxxxxxxxxxxxxxxxx> Cc: Oleg Nesterov <oleg@xxxxxxxxxx> Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> Cc: Paul Gortmaker <paul.gortmaker@xxxxxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Steven Rostedt <rostedt@xxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Stephane Eranian <eranian@xxxxxxxxxx> Cc: Jiri Olsa <jolsa@xxxxxxxxxx> --- kernel/events/core.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kernel/events/core.c b/kernel/events/core.c index b0cd865..75b58bb 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c @@ -18,6 +18,7 @@ #include <linux/poll.h> #include <linux/slab.h> #include <linux/hash.h> +#include <linux/tick.h> #include <linux/sysfs.h> #include <linux/dcache.h> #include <linux/percpu.h> @@ -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) -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html