Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8351
b: refs/heads/master
c: d6d5cfa
h: refs/heads/master
i:
  8349: 3b87a7c
  8347: 537a584
  8343: b0d61e6
  8335: 8956130
  8319: 766fbd0
v: v3
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Sep 10, 2005
1 parent ea30030 commit 684e7c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 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: 67f9a619e7460b7d07284a9d0745727a77d3ade6
refs/heads/master: d6d5cfaf4551aa7713ca6ab73bb77e832602204b
17 changes: 10 additions & 7 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2104,8 +2104,7 @@ static int load_balance(int this_cpu, runqueue_t *this_rq,
*/
double_lock_balance(this_rq, busiest);
nr_moved = move_tasks(this_rq, this_cpu, busiest,
imbalance, sd, idle,
&all_pinned);
imbalance, sd, idle, &all_pinned);
spin_unlock(&busiest->lock);

/* All tasks on this runqueue were pinned by CPU affinity */
Expand Down Expand Up @@ -2200,18 +2199,22 @@ static int load_balance_newidle(int this_cpu, runqueue_t *this_rq,

BUG_ON(busiest == this_rq);

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

schedstat_add(sd, lb_imbalance[NEWLY_IDLE], imbalance);
nr_moved = move_tasks(this_rq, this_cpu, busiest,

nr_moved = 0;
if (busiest->nr_running > 1) {
/* Attempt to move tasks */
double_lock_balance(this_rq, busiest);
nr_moved = move_tasks(this_rq, this_cpu, busiest,
imbalance, sd, NEWLY_IDLE, NULL);
spin_unlock(&busiest->lock);
}

if (!nr_moved)
schedstat_inc(sd, lb_failed[NEWLY_IDLE]);
else
sd->nr_balance_failed = 0;

spin_unlock(&busiest->lock);
return nr_moved;

out_balanced:
Expand Down

0 comments on commit 684e7c4

Please sign in to comment.