Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3286
b: refs/heads/master
c: db935db
h: refs/heads/master
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Jun 25, 2005
1 parent 15c8fae commit 0cbb5cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 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: 3950745131e23472fb5ace2ee4a2093e7590ec69
refs/heads/master: db935dbd43c4290d710304662cc908f733afea06
14 changes: 4 additions & 10 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1942,15 +1942,7 @@ static int load_balance(int this_cpu, runqueue_t *this_rq,
goto out_balanced;
}

/*
* This should be "impossible", but since load
* balancing is inherently racy and statistical,
* it could happen in theory.
*/
if (unlikely(busiest == this_rq)) {
WARN_ON(1);
goto out_balanced;
}
BUG_ON(busiest == this_rq);

schedstat_add(sd, lb_imbalance[idle], imbalance);

Expand Down Expand Up @@ -2052,11 +2044,13 @@ static int load_balance_newidle(int this_cpu, runqueue_t *this_rq,
}

busiest = find_busiest_queue(group);
if (!busiest || busiest == this_rq) {
if (!busiest) {
schedstat_inc(sd, lb_nobusyq[NEWLY_IDLE]);
goto out_balanced;
}

BUG_ON(busiest == this_rq);

/* Attempt to move tasks */
double_lock_balance(this_rq, busiest);

Expand Down

0 comments on commit 0cbb5cb

Please sign in to comment.