| @@ -3362,6 +3362,7 @@ update_cfs_rq_load_avg(u64 now, struct cfs_rq *cfs_rq) · 3361 unmodified lines |
| 3362 | 3362 | * attach_entity_load_avg - attach this entity to its cfs_rq load avg |
| 3363 | 3363 | * @cfs_rq: cfs_rq to attach to |
| 3364 | 3364 | * @se: sched_entity to attach |
| 3365 | + * @flags: migration hints |
| 3365 | 3366 | * |
| 3366 | 3367 | * Must call update_cfs_rq_load_avg() before this, since we rely on |
| 3367 | 3368 | * cfs_rq->avg.last_update_time being current. |
| @@ -7263,6 +7264,7 @@ static void update_blocked_averages(int cpu) · 3895 unmodified lines |
| 7263 | 7264 | { |
| 7264 | 7265 | struct rq *rq = cpu_rq(cpu); |
| 7265 | 7266 | struct cfs_rq *cfs_rq, *pos; |
| 7267 | + const struct sched_class *curr_class; |
| 7266 | 7268 | struct rq_flags rf; |
| 7267 | 7269 | bool done = true; |
| 7268 | 7270 | |
| @@ -7299,8 +7301,10 @@ static void update_blocked_averages(int cpu) · 30 unmodified lines |
| 7299 | 7301 | if (cfs_rq_has_blocked(cfs_rq)) |
| 7300 | 7302 | done = false; |
| 7301 | 7303 | } |
| 7302 | | − update_rt_rq_load_avg(rq_clock_task(rq), rq, 0); |
| 7303 | | − update_dl_rq_load_avg(rq_clock_task(rq), rq, 0); |
| 7304 | + |
| 7305 | + curr_class = rq->curr->sched_class; |
| 7306 | + update_rt_rq_load_avg(rq_clock_task(rq), rq, curr_class == &rt_sched_class); |
| 7307 | + update_dl_rq_load_avg(rq_clock_task(rq), rq, curr_class == &dl_sched_class); |
| 7304 | 7308 | update_irq_load_avg(rq, 0); |
| 7305 | 7309 | /* Don't need periodic decay once load/util_avg are null */ |
| 7306 | 7310 | if (others_have_blocked(rq)) |
| @@ -7365,13 +7369,16 @@ static inline void update_blocked_averages(int cpu) · 58 unmodified lines |
| 7365 | 7369 | { |
| 7366 | 7370 | struct rq *rq = cpu_rq(cpu); |
| 7367 | 7371 | struct cfs_rq *cfs_rq = &rq->cfs; |
| 7372 | + const struct sched_class *curr_class; |
| 7368 | 7373 | struct rq_flags rf; |
| 7369 | 7374 | |
| 7370 | 7375 | rq_lock_irqsave(rq, &rf); |
| 7371 | 7376 | update_rq_clock(rq); |
| 7372 | 7377 | update_cfs_rq_load_avg(cfs_rq_clock_task(cfs_rq), cfs_rq); |
| 7373 | | − update_rt_rq_load_avg(rq_clock_task(rq), rq, 0); |
| 7374 | | − update_dl_rq_load_avg(rq_clock_task(rq), rq, 0); |
| 7378 | + |
| 7379 | + curr_class = rq->curr->sched_class; |
| 7380 | + update_rt_rq_load_avg(rq_clock_task(rq), rq, curr_class == &rt_sched_class); |
| 7381 | + update_dl_rq_load_avg(rq_clock_task(rq), rq, curr_class == &dl_sched_class); |
| 7375 | 7382 | update_irq_load_avg(rq, 0); |
| 7376 | 7383 | #ifdef CONFIG_NO_HZ_COMMON |
| 7377 | 7384 | rq->last_blocked_load_update_tick = jiffies; |
| @@ -7482,10 +7489,10 @@ static inline int get_sd_load_idx(struct sched_domain *sd, · 104 unmodified lines |
| 7482 | 7489 | return load_idx; |
| 7483 | 7490 | } |
| 7484 | 7491 | |
| 7485 | | −static unsigned long scale_rt_capacity(int cpu) |
| 7492 | +static unsigned long scale_rt_capacity(struct sched_domain *sd, int cpu) |
| 7486 | 7493 | { |
| 7487 | 7494 | struct rq *rq = cpu_rq(cpu); |
| 7488 | | − unsigned long max = arch_scale_cpu_capacity(NULL, cpu); |
| 7495 | + unsigned long max = arch_scale_cpu_capacity(sd, cpu); |
| 7489 | 7496 | unsigned long used, free; |
| 7490 | 7497 | unsigned long irq; |
| 7491 | 7498 | |
| @@ -7507,7 +7514,7 @@ static unsigned long scale_rt_capacity(int cpu) · 15 unmodified lines |
| 7507 | 7514 | |
| 7508 | 7515 | static void update_cpu_capacity(struct sched_domain *sd, int cpu) |
| 7509 | 7516 | { |
| 7510 | | − unsigned long capacity = scale_rt_capacity(cpu); |
| 7517 | + unsigned long capacity = scale_rt_capacity(sd, cpu); |
| 7511 | 7518 | struct sched_group *sdg = sd->groups; |
| 7512 | 7519 | |
| 7513 | 7520 | cpu_rq(cpu)->cpu_capacity_orig = arch_scale_cpu_capacity(sd, cpu); |
| @@ -8269,7 +8276,7 @@ static struct sched_group *find_busiest_group(struct lb_env *env) · 755 unmodified lines |
| 8269 | 8276 | force_balance: |
| 8270 | 8277 | /* Looks like there is an imbalance. Compute it */ |
| 8271 | 8278 | calculate_imbalance(env, &sds); |
| 8272 | | − return sds.busiest; |
| 8279 | + return env->imbalance ? sds.busiest : NULL; |
| 8273 | 8280 | |
| 8274 | 8281 | out_balanced: |
| 8275 | 8282 | env->imbalance = 0; |
| @@ -9638,7 +9645,8 @@ static inline bool vruntime_normalized(struct task_struct *p) · 1362 unmodified lines |
| 9638 | 9645 | * - A task which has been woken up by try_to_wake_up() and |
| 9639 | 9646 | * waiting for actually being woken up by sched_ttwu_pending(). |
| 9640 | 9647 | */ |
| 9641 | | − if (!se->sum_exec_runtime || p->state == TASK_WAKING) |
| 9648 | + if (!se->sum_exec_runtime || |
| 9649 | + (p->state == TASK_WAKING && p->sched_remote_wakeup)) |
| 9642 | 9650 | return true; |
| 9643 | 9651 | |
| 9644 | 9652 | return false; |