|
@@ -1538,6 +1538,26 @@ static unsigned long target_load(int cpu, int type)
|
|
|
return max(rq->cpu_load[type-1], total);
|
|
|
}
|
|
|
|
|
|
+static struct sched_group *group_of(int cpu)
|
|
|
+{
|
|
|
+ struct sched_domain *sd = rcu_dereference(cpu_rq(cpu)->sd);
|
|
|
+
|
|
|
+ if (!sd)
|
|
|
+ return NULL;
|
|
|
+
|
|
|
+ return sd->groups;
|
|
|
+}
|
|
|
+
|
|
|
+static unsigned long power_of(int cpu)
|
|
|
+{
|
|
|
+ struct sched_group *group = group_of(cpu);
|
|
|
+
|
|
|
+ if (!group)
|
|
|
+ return SCHED_LOAD_SCALE;
|
|
|
+
|
|
|
+ return group->cpu_power;
|
|
|
+}
|
|
|
+
|
|
|
static int task_hot(struct task_struct *p, u64 now, struct sched_domain *sd);
|
|
|
|
|
|
static unsigned long cpu_avg_load_per_task(int cpu)
|
|
@@ -3982,26 +4002,6 @@ ret:
|
|
|
return NULL;
|
|
|
}
|
|
|
|
|
|
-static struct sched_group *group_of(int cpu)
|
|
|
-{
|
|
|
- struct sched_domain *sd = rcu_dereference(cpu_rq(cpu)->sd);
|
|
|
-
|
|
|
- if (!sd)
|
|
|
- return NULL;
|
|
|
-
|
|
|
- return sd->groups;
|
|
|
-}
|
|
|
-
|
|
|
-static unsigned long power_of(int cpu)
|
|
|
-{
|
|
|
- struct sched_group *group = group_of(cpu);
|
|
|
-
|
|
|
- if (!group)
|
|
|
- return SCHED_LOAD_SCALE;
|
|
|
-
|
|
|
- return group->cpu_power;
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* find_busiest_queue - find the busiest runqueue among the cpus in group.
|
|
|
*/
|