Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163010
b: refs/heads/master
c: 8e6598a
h: refs/heads/master
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 15, 2009
1 parent 1374e47 commit 0245a85
Show file tree
Hide file tree
Showing 3 changed files with 16 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: 47fe38fcff0517e67d395c039d2e26d2de688a60
refs/heads/master: 8e6598af3f35629c37249a610cf13e73f70db279
12 changes: 10 additions & 2 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -3602,11 +3602,19 @@ static void update_cpu_power(struct sched_domain *sd, int cpu)
unsigned long power = SCHED_LOAD_SCALE;
struct sched_group *sdg = sd->groups;

power *= arch_scale_freq_power(sd, cpu);
if (sched_feat(ARCH_POWER))
power *= arch_scale_freq_power(sd, cpu);
else
power *= default_scale_freq_power(sd, cpu);

power >>= SCHED_LOAD_SHIFT;

if ((sd->flags & SD_SHARE_CPUPOWER) && weight > 1) {
power *= arch_scale_smt_power(sd, cpu);
if (sched_feat(ARCH_POWER))
power *= arch_scale_smt_power(sd, cpu);
else
power *= default_scale_smt_power(sd, cpu);

power >>= SCHED_LOAD_SHIFT;
}

Expand Down
5 changes: 5 additions & 0 deletions trunk/kernel/sched_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ SCHED_FEAT(LAST_BUDDY, 1)
*/
SCHED_FEAT(CACHE_HOT_BUDDY, 1)

/*
* Use arch dependent cpu power functions
*/
SCHED_FEAT(ARCH_POWER, 0)

SCHED_FEAT(HRTICK, 0)
SCHED_FEAT(DOUBLE_TICK, 0)
SCHED_FEAT(LB_BIAS, 1)
Expand Down

0 comments on commit 0245a85

Please sign in to comment.