Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100221
b: refs/heads/master
c: 4d8d595
h: refs/heads/master
i:
  100219: e9cb281
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 27, 2008
1 parent ed6fd1d commit 206b5b0
Show file tree
Hide file tree
Showing 2 changed files with 21 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: b6a86c746f5b708012809958462234d19e9c8177
refs/heads/master: 4d8d595dfa69e1c807bf928f364668a7f30da5dc
20 changes: 20 additions & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,11 @@ aggregate_get_up(struct task_group *tg, int cpu, struct sched_domain *sd)
aggregate_group_set_shares(tg, cpu, sd);
}

static void
aggregate_get_nop(struct task_group *tg, int cpu, struct sched_domain *sd)
{
}

static DEFINE_PER_CPU(spinlock_t, aggregate_lock);

static void __init init_aggregate(void)
Expand All @@ -1740,6 +1745,11 @@ static int get_aggregate(int cpu, struct sched_domain *sd)
return 1;
}

static void update_aggregate(int cpu, struct sched_domain *sd)
{
aggregate_walk_tree(aggregate_get_down, aggregate_get_nop, cpu, sd);
}

static void put_aggregate(int cpu, struct sched_domain *sd)
{
spin_unlock(&per_cpu(aggregate_lock, cpu));
Expand All @@ -1761,6 +1771,10 @@ static inline int get_aggregate(int cpu, struct sched_domain *sd)
return 0;
}

static inline void update_aggregate(int cpu, struct sched_domain *sd)
{
}

static inline void put_aggregate(int cpu, struct sched_domain *sd)
{
}
Expand Down Expand Up @@ -2192,6 +2206,12 @@ find_idlest_group(struct sched_domain *sd, struct task_struct *p, int this_cpu)
int load_idx = sd->forkexec_idx;
int imbalance = 100 + (sd->imbalance_pct-100)/2;

/*
* now that we have both rqs locked the rq weight won't change
* anymore - so update the stats.
*/
update_aggregate(this_cpu, sd);

do {
unsigned long load, avg_load;
int local_group;
Expand Down

0 comments on commit 206b5b0

Please sign in to comment.