diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-04-20 09:48:22 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-04-22 13:59:37 -0400 |
commit | 12351ef8f9f2226636b00324d841d9c5069d80bc (patch) | |
tree | 683d021432d280ec6dbc9c26d9778fa057f2f90e /kernel | |
parent | 6ac29178b4fe8e7c0139375008f014ceb466039d (diff) |
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@gmail.com>
Cc: Chris Metcalf <cmetcalf@tilera.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Gilad Ben Yossef <gilad@benyossef.com>
Cc: Hakan Akkan <hakanakkan@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Stephane Eranian <eranian@google.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/core.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 @@ | |||
18 | #include <linux/poll.h> | 18 | #include <linux/poll.h> |
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/hash.h> | 20 | #include <linux/hash.h> |
21 | #include <linux/tick.h> | ||
21 | #include <linux/sysfs.h> | 22 | #include <linux/sysfs.h> |
22 | #include <linux/dcache.h> | 23 | #include <linux/dcache.h> |
23 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
@@ -655,8 +656,12 @@ static void perf_pmu_rotate_start(struct pmu *pmu) | |||
655 | 656 | ||
656 | WARN_ON(!irqs_disabled()); | 657 | WARN_ON(!irqs_disabled()); |
657 | 658 | ||
658 | if (list_empty(&cpuctx->rotation_list)) | 659 | if (list_empty(&cpuctx->rotation_list)) { |
660 | int was_empty = list_empty(head); | ||
659 | list_add(&cpuctx->rotation_list, head); | 661 | list_add(&cpuctx->rotation_list, head); |
662 | if (was_empty) | ||
663 | tick_nohz_full_kick(); | ||
664 | } | ||
660 | } | 665 | } |
661 | 666 | ||
662 | static void get_ctx(struct perf_event_context *ctx) | 667 | static void get_ctx(struct perf_event_context *ctx) |