Commit 82dfaa58 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Three small fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/balancing: Fix cfs_rq->task_h_load calculation
  sched/balancing: Fix 'local->avg_load > busiest->avg_load' case in fix_small_imbalance()
  sched/balancing: Fix 'local->avg_load > sds->avg_load' case in calculate_imbalance()
parents bdc5663f 7e3115ef
...@@ -4242,7 +4242,7 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq) ...@@ -4242,7 +4242,7 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq)
} }
if (!se) { if (!se) {
cfs_rq->h_load = rq->avg.load_avg_contrib; cfs_rq->h_load = cfs_rq->runnable_load_avg;
cfs_rq->last_h_load_update = now; cfs_rq->last_h_load_update = now;
} }
...@@ -4823,8 +4823,8 @@ void fix_small_imbalance(struct lb_env *env, struct sd_lb_stats *sds) ...@@ -4823,8 +4823,8 @@ void fix_small_imbalance(struct lb_env *env, struct sd_lb_stats *sds)
(busiest->load_per_task * SCHED_POWER_SCALE) / (busiest->load_per_task * SCHED_POWER_SCALE) /
busiest->group_power; busiest->group_power;
if (busiest->avg_load - local->avg_load + scaled_busy_load_per_task >= if (busiest->avg_load + scaled_busy_load_per_task >=
(scaled_busy_load_per_task * imbn)) { local->avg_load + (scaled_busy_load_per_task * imbn)) {
env->imbalance = busiest->load_per_task; env->imbalance = busiest->load_per_task;
return; return;
} }
...@@ -4896,7 +4896,8 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s ...@@ -4896,7 +4896,8 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s
* max load less than avg load(as we skip the groups at or below * max load less than avg load(as we skip the groups at or below
* its cpu_power, while calculating max_load..) * its cpu_power, while calculating max_load..)
*/ */
if (busiest->avg_load < sds->avg_load) { if (busiest->avg_load <= sds->avg_load ||
local->avg_load >= sds->avg_load) {
env->imbalance = 0; env->imbalance = 0;
return fix_small_imbalance(env, sds); return fix_small_imbalance(env, sds);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment