diff options
Diffstat (limited to 'kernel/sched/fair.c')
-rw-r--r-- | kernel/sched/fair.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index e3ed01a638df..ff9c396dce5b 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -8721,6 +8721,7 @@ static int active_load_balance_cpu_stop(void *data) .flags = 0, .loop = 0, }; + bool moved = false; raw_spin_lock_irq(&busiest_rq->lock); @@ -8751,6 +8752,7 @@ static int active_load_balance_cpu_stop(void *data) cpu_online(target_cpu)) { detach_task(push_task, &env); push_task_detached = 1; + moved = true; } goto out_unlock; } @@ -8768,10 +8770,12 @@ static int active_load_balance_cpu_stop(void *data) schedstat_inc(sd, alb_count); p = detach_one_task(&env); - if (p) + if (p) { schedstat_inc(sd, alb_pushed); - else + moved = true; + } else { schedstat_inc(sd, alb_failed); + } } rcu_read_unlock(); out_unlock: @@ -8796,6 +8800,11 @@ out_unlock: local_irq_enable(); + if (moved && !same_freq_domain(busiest_cpu, target_cpu)) { + check_for_freq_change(busiest_rq); + check_for_freq_change(target_rq); + } + if (per_cpu(dbs_boost_needed, target_cpu)) { struct migration_notify_data mnd; |