diff options
author | Mathieu Poirier <mathieu.poirier@linaro.org> | 2013-11-20 14:20:42 +0000 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2013-11-21 11:26:08 +0000 |
commit | 2a68d1e9125582bedeac4ea34fb9901ab1f7de11 (patch) | |
tree | a9bed10bd01e3bf3850bd327abdf2752ccde316f /include/trace/events/sched.h | |
parent | bd40e205ea48665ed60499001f8edf802e2901e2 (diff) |
HMP: Avoid using the cpu stopper to stop runnable tasks
When migrating a runnable task, we use the CPU stopper on
the source CPU to ensure that the task to be moved is not
currently running. Before this patch, all forced migrations
(up, offload, idle pull) use the stopper for every migration.
Using the CPU stopper is mandatory only when a task is currently
running on a CPU. Otherwise tasks can be moved by locking the
source and destination run queues.
This patch checks to see if the task to be moved are currently
running. If not the task is moved directly without using the
stopper thread.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Jon Medhurst <tixy@linaro.org>
Diffstat (limited to 'include/trace/events/sched.h')
-rw-r--r-- | include/trace/events/sched.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h index 66dc53bca19..2afcb71857f 100644 --- a/include/trace/events/sched.h +++ b/include/trace/events/sched.h @@ -580,6 +580,55 @@ TRACE_EVENT(sched_task_usage_ratio, ); /* + * Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations, + * marking the forced transition of runnable or running tasks. + */ +TRACE_EVENT(sched_hmp_migrate_force_running, + + TP_PROTO(struct task_struct *tsk, int running), + + TP_ARGS(tsk, running), + + TP_STRUCT__entry( + __array(char, comm, TASK_COMM_LEN) + __field(int, running) + ), + + TP_fast_assign( + memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); + __entry->running = running; + ), + + TP_printk("running=%d comm=%s", + __entry->running, __entry->comm) +); + +/* + * Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations, + * marking the forced transition of runnable or running + * tasks when a task is about to go idle. + */ +TRACE_EVENT(sched_hmp_migrate_idle_running, + + TP_PROTO(struct task_struct *tsk, int running), + + TP_ARGS(tsk, running), + + TP_STRUCT__entry( + __array(char, comm, TASK_COMM_LEN) + __field(int, running) + ), + + TP_fast_assign( + memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); + __entry->running = running; + ), + + TP_printk("running=%d comm=%s", + __entry->running, __entry->comm) +); + +/* * Tracepoint for HMP (CONFIG_SCHED_HMP) task migrations. */ #define HMP_MIGRATE_WAKEUP 0 |