diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2013-04-20 09:58:34 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2013-04-22 13:59:39 -0400 |
commit | 026249ef100b5384b6c74c360db46728e98354da (patch) | |
tree | 7584442e88944643f10975956afd5ab151908908 /kernel | |
parent | 12351ef8f9f2226636b00324d841d9c5069d80bc (diff) |
perf: New helper to prevent full dynticks CPUs from stopping tick
Provide a new helper that help full dynticks CPUs to prevent
from stopping their tick in case there are events in the local
rotation list.
This way we make sure that perf_event_task_tick() is serviced
on demand.
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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c index 75b58bb75b32..ddb993b52190 100644 --- a/kernel/events/core.c +++ b/kernel/events/core.c | |||
@@ -2560,6 +2560,16 @@ done: | |||
2560 | list_del_init(&cpuctx->rotation_list); | 2560 | list_del_init(&cpuctx->rotation_list); |
2561 | } | 2561 | } |
2562 | 2562 | ||
2563 | #ifdef CONFIG_NO_HZ_FULL | ||
2564 | bool perf_event_can_stop_tick(void) | ||
2565 | { | ||
2566 | if (list_empty(&__get_cpu_var(rotation_list))) | ||
2567 | return true; | ||
2568 | else | ||
2569 | return false; | ||
2570 | } | ||
2571 | #endif | ||
2572 | |||
2563 | void perf_event_task_tick(void) | 2573 | void perf_event_task_tick(void) |
2564 | { | 2574 | { |
2565 | struct list_head *head = &__get_cpu_var(rotation_list); | 2575 | struct list_head *head = &__get_cpu_var(rotation_list); |