aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index a7475913b009..50e1a3122699 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2938,17 +2938,21 @@ static void idle_balance(int this_cpu, struct rq *this_rq)
2938 unsigned long next_balance = jiffies + 60 * HZ; 2938 unsigned long next_balance = jiffies + 60 * HZ;
2939 2939
2940 for_each_domain(this_cpu, sd) { 2940 for_each_domain(this_cpu, sd) {
2941 if (sd->flags & SD_BALANCE_NEWIDLE) { 2941 unsigned long interval;
2942
2943 if (!(sd->flags & SD_LOAD_BALANCE))
2944 continue;
2945
2946 if (sd->flags & SD_BALANCE_NEWIDLE)
2942 /* If we've pulled tasks over stop searching: */ 2947 /* If we've pulled tasks over stop searching: */
2943 pulled_task = load_balance_newidle(this_cpu, 2948 pulled_task = load_balance_newidle(this_cpu,
2944 this_rq, sd); 2949 this_rq, sd);
2945 if (time_after(next_balance, 2950
2946 sd->last_balance + sd->balance_interval)) 2951 interval = msecs_to_jiffies(sd->balance_interval);
2947 next_balance = sd->last_balance 2952 if (time_after(next_balance, sd->last_balance + interval))
2948 + sd->balance_interval; 2953 next_balance = sd->last_balance + interval;
2949 if (pulled_task) 2954 if (pulled_task)
2950 break; 2955 break;
2951 }
2952 } 2956 }
2953 if (!pulled_task) 2957 if (!pulled_task)
2954 /* 2958 /*