@@ -2057,6 +2057,7 @@ static inline void account_numa_dequeue(struct rq *rq, struct task_struct *p)
#ifdef CONFIG_SMP
unsigned long capacity_of(int cpu);
+unsigned long usage_util_of(int cpu);
#endif /* CONFIG_SMP */
static void
@@ -4140,6 +4141,11 @@ unsigned long capacity_of(int cpu)
return cpu_rq(cpu)->cpu_capacity;
}
+unsigned long usage_util_of(int cpu)
+{
+ return cpu_rq(cpu)->cfs.usage_util_avg;
+}
+
static unsigned long cpu_avg_load_per_task(int cpu)
{
struct rq *rq = cpu_rq(cpu);
@@ -310,6 +310,7 @@ struct cfs_bandwidth { };
#endif /* CONFIG_CGROUP_SCHED */
extern unsigned long capacity_of(int cpu);
+extern unsigned long usage_util_of(int cpu);
/* CFS-related fields in a runqueue */
struct cfs_rq {
Signed-off-by: Mike Turquette <mturquette@linaro.org> --- kernel/sched/fair.c | 6 ++++++ kernel/sched/sched.h | 1 + 2 files changed, 7 insertions(+)