Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87476
b: refs/heads/master
c: f482738
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Mar 19, 2008
1 parent 6314105 commit 870106b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ac192d3921a14e2c9080799e16959b4bd56f49d6
refs/heads/master: f48273860edfca2306236d0f0de609aab3f773d4
25 changes: 10 additions & 15 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
new_cpu = prev_cpu;

if (prev_cpu == this_cpu)
goto out_set_cpu;
goto out;

/*
* 'this_sd' is the first domain that both
Expand All @@ -1054,13 +1054,13 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
}

if (unlikely(!cpu_isset(this_cpu, p->cpus_allowed)))
goto out_set_cpu;
goto out;

/*
* Check for affine wakeup and passive balancing possibilities.
*/
if (!this_sd)
goto out_keep_cpu;
goto out;

idx = this_sd->wake_idx;

Expand All @@ -1069,11 +1069,11 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
load = source_load(prev_cpu, idx);
this_load = target_load(this_cpu, idx);

new_cpu = this_cpu; /* Wake to this CPU if we can */

if (wake_affine(rq, this_sd, p, prev_cpu, this_cpu, sync, idx,
load, this_load, imbalance))
goto out_set_cpu;
load, this_load, imbalance)) {
new_cpu = this_cpu;
goto out;
}

/*
* Start passive balancing when half the imbalance_pct
Expand All @@ -1083,17 +1083,12 @@ static int select_task_rq_fair(struct task_struct *p, int sync)
if (imbalance*this_load <= 100*load) {
schedstat_inc(this_sd, ttwu_move_balance);
schedstat_inc(p, se.nr_wakeups_passive);
goto out_set_cpu;
new_cpu = this_cpu;
goto out;
}
}

out_keep_cpu:
/*
* Could not wake to this_cpu.
* Wake to the previous cpu instead:
*/
new_cpu = prev_cpu;
out_set_cpu:
out:
return wake_idle(new_cpu, p);
}
#endif /* CONFIG_SMP */
Expand Down

0 comments on commit 870106b

Please sign in to comment.