aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-06 05:47:52 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-06 05:47:52 -0500
commit7fc07d84108d54c5b94625c0e168f31b2d66976e (patch)
treebebcbcae186108a815de0c1b90e25b1a5fa3852c /kernel/sched.c
parentb67802ea8061393f7bd2d4db934646e76096027c (diff)
parent8a0be9ef8225638d26b455788f988c8f84ce9e75 (diff)
Merge branch 'sched/core' into sched/cleanups
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 9fe8e17574af..8b92f40c147d 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -4148,6 +4148,11 @@ static void run_rebalance_domains(struct softirq_action *h)
4148#endif 4148#endif
4149} 4149}
4150 4150
4151static inline int on_null_domain(int cpu)
4152{
4153 return !rcu_dereference(cpu_rq(cpu)->sd);
4154}
4155
4151/* 4156/*
4152 * Trigger the SCHED_SOFTIRQ if it is time to do periodic load balancing. 4157 * Trigger the SCHED_SOFTIRQ if it is time to do periodic load balancing.
4153 * 4158 *
@@ -4205,7 +4210,9 @@ static inline void trigger_load_balance(struct rq *rq, int cpu)
4205 cpumask_test_cpu(cpu, nohz.cpu_mask)) 4210 cpumask_test_cpu(cpu, nohz.cpu_mask))
4206 return; 4211 return;
4207#endif 4212#endif
4208 if (time_after_eq(jiffies, rq->next_balance)) 4213 /* Don't need to rebalance while attached to NULL domain */
4214 if (time_after_eq(jiffies, rq->next_balance) &&
4215 likely(!on_null_domain(cpu)))
4209 raise_softirq(SCHED_SOFTIRQ); 4216 raise_softirq(SCHED_SOFTIRQ);
4210} 4217}
4211 4218