Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158333
b: refs/heads/master
c: e709715
h: refs/heads/master
i:
  158331: 47907a6
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Aug 2, 2009
1 parent cfb29bf commit ec78e82
Show file tree
Hide file tree
Showing 2 changed files with 15 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: a5004278f0525dcb9aa43703ef77bf371ea837cd
refs/heads/master: e709715915d69b6a929d77e7652c9c3fea61c317
16 changes: 14 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1629,8 +1629,14 @@ static int tg_load_down(struct task_group *tg, void *data)

static void update_shares(struct sched_domain *sd)
{
u64 now = cpu_clock(raw_smp_processor_id());
s64 elapsed = now - sd->last_update;
s64 elapsed;
u64 now;

if (root_task_group_empty())
return;

now = cpu_clock(raw_smp_processor_id());
elapsed = now - sd->last_update;

if (elapsed >= (s64)(u64)sysctl_sched_shares_ratelimit) {
sd->last_update = now;
Expand All @@ -1640,13 +1646,19 @@ static void update_shares(struct sched_domain *sd)

static void update_shares_locked(struct rq *rq, struct sched_domain *sd)
{
if (root_task_group_empty())
return;

spin_unlock(&rq->lock);
update_shares(sd);
spin_lock(&rq->lock);
}

static void update_h_load(long cpu)
{
if (root_task_group_empty())
return;

walk_tg_tree(tg_load_down, tg_nop, (void *)cpu);
}

Expand Down

0 comments on commit ec78e82

Please sign in to comment.