Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 135700
b: refs/heads/master
c: 8a0be9e
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Mar 5, 2009
1 parent e4a74ab commit dd0ba9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 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: 49d2d266adff27793fed247a2e9e672d59b6ddc6
refs/heads/master: 8a0be9ef8225638d26b455788f988c8f84ce9e75
9 changes: 8 additions & 1 deletion trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -4148,6 +4148,11 @@ static void run_rebalance_domains(struct softirq_action *h)
#endif
}

static inline int on_null_domain(int cpu)
{
return !rcu_dereference(cpu_rq(cpu)->sd);
}

/*
* Trigger the SCHED_SOFTIRQ if it is time to do periodic load balancing.
*
Expand Down Expand Up @@ -4205,7 +4210,9 @@ static inline void trigger_load_balance(struct rq *rq, int cpu)
cpumask_test_cpu(cpu, nohz.cpu_mask))
return;
#endif
if (time_after_eq(jiffies, rq->next_balance))
/* Don't need to rebalance while attached to NULL domain */
if (time_after_eq(jiffies, rq->next_balance) &&
likely(!on_null_domain(cpu)))
raise_softirq(SCHED_SOFTIRQ);
}

Expand Down

0 comments on commit dd0ba9f

Please sign in to comment.