Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100229
b: refs/heads/master
c: bb3469a
h: refs/heads/master
i:
  100227: 95f1c33
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 27, 2008
1 parent 9c82462 commit d54679a
Show file tree
Hide file tree
Showing 2 changed files with 22 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: a8a51d5e59561aa5b4d66e19eca819b537783e8f
refs/heads/master: bb3469ac9b50f14ad6eba129ca0ad4fd033097a0
23 changes: 21 additions & 2 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1073,6 +1073,25 @@ static inline int wake_idle(int cpu, struct task_struct *p)

static const struct sched_class fair_sched_class;

#ifdef CONFIG_FAIR_GROUP_SCHED
static unsigned long task_h_load(struct task_struct *p)
{
unsigned long h_load = p->se.load.weight;
struct cfs_rq *cfs_rq = cfs_rq_of(&p->se);

update_h_load(task_cpu(p));

h_load = calc_delta_mine(h_load, cfs_rq->h_load, &cfs_rq->load);

return h_load;
}
#else
static unsigned long task_h_load(struct task_struct *p)
{
return p->se.load.weight;
}
#endif

static int
wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq,
struct task_struct *p, int prev_cpu, int this_cpu, int sync,
Expand All @@ -1093,9 +1112,9 @@ wake_affine(struct rq *rq, struct sched_domain *this_sd, struct rq *this_rq,
* of the current CPU:
*/
if (sync)
tl -= current->se.load.weight;
tl -= task_h_load(current);

balanced = 100*(tl + p->se.load.weight) <= imbalance*load;
balanced = 100*(tl + task_h_load(p)) <= imbalance*load;

/*
* If the currently running task will sleep within
Expand Down

0 comments on commit d54679a

Please sign in to comment.