Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100223
b: refs/heads/master
c: d3f40db
h: refs/heads/master
i:
  100221: 206b5b0
  100219: e9cb281
  100215: a3605f5
  100207: 637dee1
  100191: 3f0853d
  100159: 257f13a
  100095: 982d6d6
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 27, 2008
1 parent 521fb17 commit 9482a58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 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: 53fecd8ae1900fb571086f54f664051004665b55
refs/heads/master: d3f40dbab954d83383b6a516582d5c09cc216dcc
26 changes: 3 additions & 23 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1551,6 +1551,9 @@ aggregate_group_shares(struct task_group *tg, int cpu, struct sched_domain *sd)
if ((!shares && aggregate(tg, cpu)->rq_weight) || shares > tg->shares)
shares = tg->shares;

if (!sd->parent || !(sd->parent->flags & SD_LOAD_BALANCE))
shares = tg->shares;

aggregate(tg, cpu)->shares = shares;
}

Expand Down Expand Up @@ -1642,20 +1645,8 @@ static void
__move_group_shares(struct task_group *tg, int cpu, struct sched_domain *sd,
int scpu, int dcpu)
{
unsigned long shares;

shares = tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares;

__update_group_shares_cpu(tg, cpu, sd, scpu);
__update_group_shares_cpu(tg, cpu, sd, dcpu);

/*
* ensure we never loose shares due to rounding errors in the
* above redistribution.
*/
shares -= tg->cfs_rq[scpu]->shares + tg->cfs_rq[dcpu]->shares;
if (shares)
tg->cfs_rq[dcpu]->shares += shares;
}

/*
Expand All @@ -1675,7 +1666,6 @@ move_group_shares(struct task_group *tg, int cpu, struct sched_domain *sd,
static void
aggregate_group_set_shares(struct task_group *tg, int cpu, struct sched_domain *sd)
{
unsigned long shares = aggregate(tg, cpu)->shares;
int i;

for_each_cpu_mask(i, sd->span) {
Expand All @@ -1688,16 +1678,6 @@ aggregate_group_set_shares(struct task_group *tg, int cpu, struct sched_domain *
}

aggregate_group_shares(tg, cpu, sd);

/*
* ensure we never loose shares due to rounding errors in the
* above redistribution.
*/
shares -= aggregate(tg, cpu)->shares;
if (shares) {
tg->cfs_rq[cpu]->shares += shares;
aggregate(tg, cpu)->shares += shares;
}
}

/*
Expand Down

0 comments on commit 9482a58

Please sign in to comment.