Commit dfc68f29 authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Ingo Molnar

sched, trace: Add a tracepoint for IPI-less remote wakeups

Remote wakeups of polling CPUs are a valuable performance
improvement; add a tracepoint to make it much easier to verify that
they're working.
Signed-off-by: default avatarAndy Lutomirski <luto@amacapital.net>
Signed-off-by: default avatarPeter Zijlstra <peterz@infradead.org>
Cc: nicolas.pitre@linaro.org
Cc: daniel.lezcano@linaro.org
Cc: umgwanakikbuti@gmail.com
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org
Link: http://lkml.kernel.org/r/16205aee116772aa686814f9b13bccb562108047.1401902905.git.luto@amacapital.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 84c40708
...@@ -530,6 +530,26 @@ TRACE_EVENT(sched_swap_numa, ...@@ -530,6 +530,26 @@ TRACE_EVENT(sched_swap_numa,
__entry->dst_pid, __entry->dst_tgid, __entry->dst_ngid, __entry->dst_pid, __entry->dst_tgid, __entry->dst_ngid,
__entry->dst_cpu, __entry->dst_nid) __entry->dst_cpu, __entry->dst_nid)
); );
/*
* Tracepoint for waking a polling cpu without an IPI.
*/
TRACE_EVENT(sched_wake_idle_without_ipi,
TP_PROTO(int cpu),
TP_ARGS(cpu),
TP_STRUCT__entry(
__field( int, cpu )
),
TP_fast_assign(
__entry->cpu = cpu;
),
TP_printk("cpu=%d", __entry->cpu)
);
#endif /* _TRACE_SCHED_H */ #endif /* _TRACE_SCHED_H */
/* This part must be outside protection */ /* This part must be outside protection */
......
...@@ -564,6 +564,8 @@ void resched_task(struct task_struct *p) ...@@ -564,6 +564,8 @@ void resched_task(struct task_struct *p)
if (set_nr_and_not_polling(p)) if (set_nr_and_not_polling(p))
smp_send_reschedule(cpu); smp_send_reschedule(cpu);
else
trace_sched_wake_idle_without_ipi(cpu);
} }
void resched_cpu(int cpu) void resched_cpu(int cpu)
...@@ -647,6 +649,8 @@ static void wake_up_idle_cpu(int cpu) ...@@ -647,6 +649,8 @@ static void wake_up_idle_cpu(int cpu)
smp_mb(); smp_mb();
if (!tsk_is_polling(rq->idle)) if (!tsk_is_polling(rq->idle))
smp_send_reschedule(cpu); smp_send_reschedule(cpu);
else
trace_sched_wake_idle_without_ipi(cpu);
} }
static bool wake_up_full_nohz_cpu(int cpu) static bool wake_up_full_nohz_cpu(int cpu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment