mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
[PATCH] sched: fix the all pinned logic in load_balance_newidle()
nr_moved is not the correct check for triggering all pinned logic. Fix the all pinned logic in the case of load_balance_newidle(). Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
9439aab8db
commit
969bb4e403
1 changed files with 4 additions and 2 deletions
|
@ -2679,6 +2679,7 @@ load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd)
|
|||
unsigned long imbalance;
|
||||
int nr_moved = 0;
|
||||
int sd_idle = 0;
|
||||
int all_pinned = 0;
|
||||
cpumask_t cpus = CPU_MASK_ALL;
|
||||
|
||||
/*
|
||||
|
@ -2717,10 +2718,11 @@ redo:
|
|||
double_lock_balance(this_rq, busiest);
|
||||
nr_moved = move_tasks(this_rq, this_cpu, busiest,
|
||||
minus_1_or_zero(busiest->nr_running),
|
||||
imbalance, sd, CPU_NEWLY_IDLE, NULL);
|
||||
imbalance, sd, CPU_NEWLY_IDLE,
|
||||
&all_pinned);
|
||||
spin_unlock(&busiest->lock);
|
||||
|
||||
if (!nr_moved) {
|
||||
if (unlikely(all_pinned)) {
|
||||
cpu_clear(cpu_of(busiest), cpus);
|
||||
if (!cpus_empty(cpus))
|
||||
goto redo;
|
||||
|
|
Loading…
Reference in a new issue