From 28c81d48a7b944c413d6b6f74d712727c842d8ee Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Tue, 25 Nov 2008 02:35:10 +1030 Subject: [PATCH] --- yaml --- r: 125320 b: refs/heads/master c: 4d2732c63e0c05cfef2a74868d08eace922dfc3e h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/kernel/sched.c | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 42850e9af1f8..498789e1dd72 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7d1e6a9b95e3edeac91888bc683ae62f18519432 +refs/heads/master: 4d2732c63e0c05cfef2a74868d08eace922dfc3e diff --git a/trunk/kernel/sched.c b/trunk/kernel/sched.c index 2f8ea99df16a..154a95fcea7e 100644 --- a/trunk/kernel/sched.c +++ b/trunk/kernel/sched.c @@ -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; @@ -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)) @@ -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); } /*