提交 12351ef8 编写于 作者: F Frederic Weisbecker

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: NFrederic 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>
上级 6ac29178
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/poll.h> #include <linux/poll.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/hash.h> #include <linux/hash.h>
#include <linux/tick.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/dcache.h> #include <linux/dcache.h>
#include <linux/percpu.h> #include <linux/percpu.h>
...@@ -655,8 +656,12 @@ static void perf_pmu_rotate_start(struct pmu *pmu) ...@@ -655,8 +656,12 @@ static void perf_pmu_rotate_start(struct pmu *pmu)
WARN_ON(!irqs_disabled()); 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); list_add(&cpuctx->rotation_list, head);
if (was_empty)
tick_nohz_full_kick();
}
} }
static void get_ctx(struct perf_event_context *ctx) static void get_ctx(struct perf_event_context *ctx)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册