Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54759
b: refs/heads/master
c: 4953198
h: refs/heads/master
i:
  54757: c04ac4c
  54755: 053cfa9
  54751: 9f8bc2e
v: v3
  • Loading branch information
Siddha, Suresh B authored and Linus Torvalds committed May 8, 2007
1 parent 4b92744 commit a1adf2b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 5517d86bea237c1d7078840182d9ebc0fe4c1afc
refs/heads/master: 4953198b6ce07b008b0f1c2edd41c9d027a118b4
11 changes: 10 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1406,7 +1406,16 @@ static int wake_idle(int cpu, struct task_struct *p)
struct sched_domain *sd;
int i;

if (idle_cpu(cpu))
/*
* If it is idle, then it is the best cpu to run this task.
*
* This cpu is also the best, if it has more than one task already.
* Siblings must be also busy(in most cases) as they didn't already
* pickup the extra load from this cpu and hence we need not check
* sibling runqueue info. This will avoid the checks and cache miss
* penalities associated with that.
*/
if (idle_cpu(cpu) || cpu_rq(cpu)->nr_running > 1)
return cpu;

for_each_domain(cpu, sd) {
Expand Down

0 comments on commit a1adf2b

Please sign in to comment.