Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100226
b: refs/heads/master
c: 3e5459b
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 27, 2008
1 parent adc5be8 commit 60519ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c8cba857b4997d5b00451d01474638f6a153f713
refs/heads/master: 3e5459b4bea3ca2618cc02d56d12639f2cba531d
13 changes: 13 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1579,6 +1579,13 @@ static void update_shares(struct sched_domain *sd)
walk_tg_tree(tg_nop, tg_shares_up, 0, sd);
}

static void update_shares_locked(struct rq *rq, struct sched_domain *sd)
{
spin_unlock(&rq->lock);
update_shares(sd);
spin_lock(&rq->lock);
}

static void update_h_load(int cpu)
{
walk_tg_tree(tg_load_down, tg_nop, cpu, NULL);
Expand All @@ -1595,6 +1602,10 @@ static inline void update_shares(struct sched_domain *sd)
{
}

static inline void update_shares_locked(struct rq *rq, struct sched_domain *sd)
{
}

#endif

#endif
Expand Down Expand Up @@ -3543,6 +3554,7 @@ load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd,

schedstat_inc(sd, lb_count[CPU_NEWLY_IDLE]);
redo:
update_shares_locked(this_rq, sd);
group = find_busiest_group(sd, this_cpu, &imbalance, CPU_NEWLY_IDLE,
&sd_idle, cpus, NULL);
if (!group) {
Expand Down Expand Up @@ -3586,6 +3598,7 @@ load_balance_newidle(int this_cpu, struct rq *this_rq, struct sched_domain *sd,
} else
sd->nr_balance_failed = 0;

update_shares_locked(this_rq, sd);
return ld_moved;

out_balanced:
Expand Down

0 comments on commit 60519ea

Please sign in to comment.