| @@ -7209,45 +7209,9 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool · 7208 unmodified lines |
| 7209 | 7209 | struct cpumask *cpus = this_cpu_cpumask_var_ptr(select_rq_mask); |
| 7210 | 7210 | int i, cpu, idle_cpu = -1, nr = INT_MAX; |
| 7211 | 7211 | struct sched_domain_shared *sd_share; |
| 7212 | | − struct rq *this_rq = this_rq(); |
| 7213 | | − int this = smp_processor_id(); |
| 7214 | | − struct sched_domain *this_sd = NULL; |
| 7215 | | − u64 time = 0; |
| 7216 | 7212 | |
| 7217 | 7213 | cpumask_and(cpus, sched_domain_span(sd), p->cpus_ptr); |
| 7218 | 7214 | |
| 7219 | | − if (sched_feat(SIS_PROP) && !has_idle_core) { |
| 7220 | | − u64 avg_cost, avg_idle, span_avg; |
| 7221 | | − unsigned long now = jiffies; |
| 7222 | | − |
| 7223 | | − this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc)); |
| 7224 | | − if (!this_sd) |
| 7225 | | − return -1; |
| 7226 | | − |
| 7227 | | − /* |
| 7228 | | − * If we're busy, the assumption that the last idle period |
| 7229 | | − * predicts the future is flawed; age away the remaining |
| 7230 | | − * predicted idle time. |
| 7231 | | − */ |
| 7232 | | − if (unlikely(this_rq->wake_stamp < now)) { |
| 7233 | | − while (this_rq->wake_stamp < now && this_rq->wake_avg_idle) { |
| 7234 | | − this_rq->wake_stamp++; |
| 7235 | | − this_rq->wake_avg_idle >>= 1; |
| 7236 | | − } |
| 7237 | | − } |
| 7238 | | − |
| 7239 | | − avg_idle = this_rq->wake_avg_idle; |
| 7240 | | − avg_cost = this_sd->avg_scan_cost + 1; |
| 7241 | | − |
| 7242 | | − span_avg = sd->span_weight * avg_idle; |
| 7243 | | − if (span_avg > 4*avg_cost) |
| 7244 | | − nr = div_u64(span_avg, avg_cost); |
| 7245 | | − else |
| 7246 | | − nr = 4; |
| 7247 | | − |
| 7248 | | − time = cpu_clock(this); |
| 7249 | | − } |
| 7250 | | − |
| 7251 | 7215 | if (sched_feat(SIS_UTIL)) { |
| 7252 | 7216 | sd_share = rcu_dereference(per_cpu(sd_llc_shared, target)); |
| 7253 | 7217 | if (sd_share) { |
| @@ -7301,18 +7265,6 @@ static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, bool · 47 unmodified lines |
| 7301 | 7265 | if (has_idle_core) |
| 7302 | 7266 | set_idle_cores(target, false); |
| 7303 | 7267 | |
| 7304 | | − if (sched_feat(SIS_PROP) && this_sd && !has_idle_core) { |
| 7305 | | − time = cpu_clock(this) - time; |
| 7306 | | − |
| 7307 | | − /* |
| 7308 | | − * Account for the scan cost of wakeups against the average |
| 7309 | | − * idle time. |
| 7310 | | − */ |
| 7311 | | − this_rq->wake_avg_idle -= min(this_rq->wake_avg_idle, time); |
| 7312 | | − |
| 7313 | | − update_avg(&this_sd->avg_scan_cost, time); |
| 7314 | | − } |
| 7315 | | − |
| 7316 | 7268 | return idle_cpu; |
| 7317 | 7269 | } |
| 7318 | 7270 | |