]> Pileus Git - ~andy/linux/blobdiff - kernel/sched.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
[~andy/linux] / kernel / sched.c
index a7475913b009744b3d97adee9d95b305d5c46de4..50e1a312269945284bc0ce769eb9b2acd629b7f2 100644 (file)
@@ -2938,17 +2938,21 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
        unsigned long next_balance = jiffies + 60 *  HZ;
 
        for_each_domain(this_cpu, sd) {
-               if (sd->flags & SD_BALANCE_NEWIDLE) {
+               unsigned long interval;
+
+               if (!(sd->flags & SD_LOAD_BALANCE))
+                       continue;
+
+               if (sd->flags & SD_BALANCE_NEWIDLE)
                        /* If we've pulled tasks over stop searching: */
                        pulled_task = load_balance_newidle(this_cpu,
-                                                       this_rq, sd);
-                       if (time_after(next_balance,
-                                 sd->last_balance + sd->balance_interval))
-                               next_balance = sd->last_balance
-                                               + sd->balance_interval;
-                       if (pulled_task)
-                               break;
-               }
+                                                               this_rq, sd);
+
+               interval = msecs_to_jiffies(sd->balance_interval);
+               if (time_after(next_balance, sd->last_balance + interval))
+                       next_balance = sd->last_balance + interval;
+               if (pulled_task)
+                       break;
        }
        if (!pulled_task)
                /*