From 76da8e29cef3597651fde396a294dbf528307ae2 Mon Sep 17 00:00:00 2001 From: Steve Muckle Date: Mon, 10 Nov 2014 17:35:52 -0800 Subject: sched: print sched_cpu_load tracepoint for all CPUs When select_best_cpu() is called because a task is on a suboptimal CPU, certain CPUs are skipped because moving the task there would not make things any better. For the purposes of debugging though it is useful to always see the state of all CPUs. Change-Id: I76965663c1feef5c4cfab9909e477b0dcf67272d Signed-off-by: Steve Muckle --- kernel/sched/fair.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index dcc3f57668e1..0ae7c75fffc7 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -3130,12 +3130,12 @@ static int select_best_cpu(struct task_struct *p, int target, int reason) /* Todo : Optimize this loop */ for_each_cpu_and(i, tsk_cpus_allowed(p), cpu_online_mask) { - if (skip_cpu(p, i, reason)) - continue; - trace_sched_cpu_load(cpu_rq(i), idle_cpu(i), mostly_idle_cpu(i), power_cost(p, i)); + if (skip_cpu(p, i, reason)) + continue; + /* * The least-loaded mostly-idle CPU where the task * won't fit is our fallback if we can't find a CPU -- cgit v1.2.3