|
@@ -6054,19 +6054,6 @@ static inline int get_sd_load_idx(struct sched_domain *sd,
|
|
|
return load_idx;
|
|
|
}
|
|
|
|
|
|
-static unsigned long default_scale_cpu_capacity(struct sched_domain *sd, int cpu)
|
|
|
-{
|
|
|
- if ((sd->flags & SD_SHARE_CPUCAPACITY) && (sd->span_weight > 1))
|
|
|
- return sd->smt_gain / sd->span_weight;
|
|
|
-
|
|
|
- return SCHED_CAPACITY_SCALE;
|
|
|
-}
|
|
|
-
|
|
|
-unsigned long __weak arch_scale_cpu_capacity(struct sched_domain *sd, int cpu)
|
|
|
-{
|
|
|
- return default_scale_cpu_capacity(sd, cpu);
|
|
|
-}
|
|
|
-
|
|
|
static unsigned long scale_rt_capacity(int cpu)
|
|
|
{
|
|
|
struct rq *rq = cpu_rq(cpu);
|
|
@@ -6096,16 +6083,9 @@ static unsigned long scale_rt_capacity(int cpu)
|
|
|
|
|
|
static void update_cpu_capacity(struct sched_domain *sd, int cpu)
|
|
|
{
|
|
|
- unsigned long capacity = SCHED_CAPACITY_SCALE;
|
|
|
+ unsigned long capacity = arch_scale_cpu_capacity(sd, cpu);
|
|
|
struct sched_group *sdg = sd->groups;
|
|
|
|
|
|
- if (sched_feat(ARCH_CAPACITY))
|
|
|
- capacity *= arch_scale_cpu_capacity(sd, cpu);
|
|
|
- else
|
|
|
- capacity *= default_scale_cpu_capacity(sd, cpu);
|
|
|
-
|
|
|
- capacity >>= SCHED_CAPACITY_SHIFT;
|
|
|
-
|
|
|
cpu_rq(cpu)->cpu_capacity_orig = capacity;
|
|
|
|
|
|
capacity *= scale_rt_capacity(cpu);
|