Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125320
b: refs/heads/master
c: 4d2732c
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Ingo Molnar committed Nov 24, 2008
1 parent 89a0a79 commit 28c81d4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 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: 7d1e6a9b95e3edeac91888bc683ae62f18519432
refs/heads/master: 4d2732c63e0c05cfef2a74868d08eace922dfc3e
8 changes: 6 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3676,7 +3676,10 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
struct sched_domain *sd;
int pulled_task = -1;
unsigned long next_balance = jiffies + HZ;
cpumask_t tmpmask;
cpumask_var_t tmpmask;

if (!alloc_cpumask_var(&tmpmask, GFP_ATOMIC))
return;

for_each_domain(this_cpu, sd) {
unsigned long interval;
Expand All @@ -3687,7 +3690,7 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
if (sd->flags & SD_BALANCE_NEWIDLE)
/* If we've pulled tasks over stop searching: */
pulled_task = load_balance_newidle(this_cpu, this_rq,
sd, &tmpmask);
sd, tmpmask);

interval = msecs_to_jiffies(sd->balance_interval);
if (time_after(next_balance, sd->last_balance + interval))
Expand All @@ -3702,6 +3705,7 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
*/
this_rq->next_balance = next_balance;
}
free_cpumask_var(tmpmask);
}

/*
Expand Down

0 comments on commit 28c81d4

Please sign in to comment.