Commit f22aef4a authored by Mel Gorman's avatar Mel Gorman Committed by Ingo Molnar

sched/numa: Trace when no candidate CPU was found on the preferred node

sched:sched_stick_numa is meant to fire when a task is unable to migrate
to the preferred node. The case where no candidate CPU could be found is
not traced which is an important gap. The tracepoint is not fired when
the task is not allowed to run on any CPU on the preferred node or the
task is already running on the target CPU but neither are interesting
corner cases.
Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>
Cc: Valentin Schneider <valentin.schneider@arm.com>
Cc: Phil Auld <pauld@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Link: https://lore.kernel.org/r/20200224095223.13361-3-mgorman@techsingularity.net
parent 546121b6
...@@ -1848,8 +1848,10 @@ static int task_numa_migrate(struct task_struct *p) ...@@ -1848,8 +1848,10 @@ static int task_numa_migrate(struct task_struct *p)
} }
/* No better CPU than the current one was found. */ /* No better CPU than the current one was found. */
if (env.best_cpu == -1) if (env.best_cpu == -1) {
trace_sched_stick_numa(p, env.src_cpu, -1);
return -EAGAIN; return -EAGAIN;
}
best_rq = cpu_rq(env.best_cpu); best_rq = cpu_rq(env.best_cpu);
if (env.best_task == NULL) { if (env.best_task == NULL) {
......
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