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