diff options
| -rw-r--r-- | kernel/sched/fair.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index 2d4ad72f8f3c..76ee7de1859d 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c | |||
| @@ -5471,13 +5471,18 @@ static inline int select_idle_smt(struct task_struct *p, struct sched_domain *sd | |||
| 5471 | */ | 5471 | */ |
| 5472 | static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target) | 5472 | static int select_idle_cpu(struct task_struct *p, struct sched_domain *sd, int target) |
| 5473 | { | 5473 | { |
| 5474 | struct sched_domain *this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc)); | 5474 | struct sched_domain *this_sd; |
| 5475 | u64 avg_idle = this_rq()->avg_idle; | 5475 | u64 avg_cost, avg_idle = this_rq()->avg_idle; |
| 5476 | u64 avg_cost = this_sd->avg_scan_cost; | ||
| 5477 | u64 time, cost; | 5476 | u64 time, cost; |
| 5478 | s64 delta; | 5477 | s64 delta; |
| 5479 | int cpu, wrap; | 5478 | int cpu, wrap; |
| 5480 | 5479 | ||
| 5480 | this_sd = rcu_dereference(*this_cpu_ptr(&sd_llc)); | ||
| 5481 | if (!this_sd) | ||
| 5482 | return -1; | ||
| 5483 | |||
| 5484 | avg_cost = this_sd->avg_scan_cost; | ||
| 5485 | |||
| 5481 | /* | 5486 | /* |
| 5482 | * Due to large variance we need a large fuzz factor; hackbench in | 5487 | * Due to large variance we need a large fuzz factor; hackbench in |
| 5483 | * particularly is sensitive here. | 5488 | * particularly is sensitive here. |
