Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 277400
b: refs/heads/master
c: 067491b
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Dec 8, 2011
1 parent 5d45750 commit 92f3814
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: cd490c5b285544dc1319cf79c2ca0528a6447f61
refs/heads/master: 067491b7313c41f49607fce782d29344d1472587
9 changes: 7 additions & 2 deletions trunk/kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -5088,23 +5088,28 @@ static inline int nohz_kick_needed(struct rq *rq, int cpu)
if (rq->nr_running >= 2)
goto need_kick;

rcu_read_lock();
for_each_domain(cpu, sd) {
struct sched_group *sg = sd->groups;
struct sched_group_power *sgp = sg->sgp;
int nr_busy = atomic_read(&sgp->nr_busy_cpus);

if (sd->flags & SD_SHARE_PKG_RESOURCES && nr_busy > 1)
goto need_kick;
goto need_kick_unlock;

if (sd->flags & SD_ASYM_PACKING && nr_busy != sg->group_weight
&& (cpumask_first_and(nohz.idle_cpus_mask,
sched_domain_span(sd)) < cpu))
goto need_kick;
goto need_kick_unlock;

if (!(sd->flags & (SD_SHARE_PKG_RESOURCES | SD_ASYM_PACKING)))
break;
}
rcu_read_unlock();
return 0;

need_kick_unlock:
rcu_read_unlock();
need_kick:
return 1;
}
Expand Down

0 comments on commit 92f3814

Please sign in to comment.