From: Chris Redpath Date: Mon, 19 Aug 2013 14:06:20 +0000 (+0100) Subject: sched: HMP change nr_running offload metric X-Git-Tag: firefly_0821_release~3680^2~5^2~3^2~18^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1f435579ea80d4639061435d8337df5a2c92e530;p=firefly-linux-kernel-4.4.55.git sched: HMP change nr_running offload metric rq->nr_running was better than cfs.nr_running, since it includes all tasks actually on the CPU. However, it includes RT tasks which we would rather ignore at this point. Switching to cfs.h_nr_running includes all the CFS tasks but no RT tasks. Signed-off-by: Chris Redpath Signed-off-by: Liviu Dudau Signed-off-by: Jon Medhurst --- diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 78f6d028d294..c7c41412f5e7 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -4029,7 +4029,7 @@ static inline unsigned int hmp_offload_down(int cpu, struct sched_entity *se) return NR_CPUS; /* Is the task alone on the cpu? */ - if (cpu_rq(cpu)->cfs.nr_running < 2) + if (cpu_rq(cpu)->cfs.h_nr_running < 2) return NR_CPUS; /* Is the task actually starving? */