Skip to content

Commit

Permalink
sched: fair: Express idle cost power as percentage of busy state
Browse files Browse the repository at this point in the history
This seems overall better to express static leakage power usage than the unrealistic small values for WFI.

Device tree values are expressed as % in SCHED_CAPACITY_SCALE.
  • Loading branch information
AndreiLux committed Apr 17, 2018
1 parent f4e619a commit 8342882
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
12 changes: 6 additions & 6 deletions arch/arm64/boot/dts/exynos/exynos9810-starlte_eur_open_26.dts
Original file line number Diff line number Diff line change
Expand Up @@ -3245,7 +3245,7 @@
1024 7533
>;
idle-cost-data = <
10
200
0
0
>;
Expand All @@ -3265,7 +3265,7 @@
198 250
>;
idle-cost-data = <
1
200
0
0
>;
Expand Down Expand Up @@ -3295,8 +3295,8 @@
1024 2490
>;
idle-cost-data = <
268
268
768
768
0
>;
};
Expand All @@ -3315,8 +3315,8 @@
198 58
>;
idle-cost-data = <
5
5
200
200
0
>;
};
Expand Down
7 changes: 5 additions & 2 deletions kernel/sched/fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -5854,8 +5854,11 @@ static int sched_group_energy(struct energy_env *eenv)
group_util = group_norm_util(eenv, sg);

sg_busy_energy = (group_util * sg->sge->cap_states[cap_idx].power);
sg_idle_energy = ((SCHED_CAPACITY_SCALE-group_util)
* sg->sge->idle_states[idle_idx].power);
sg_idle_energy = ((SCHED_CAPACITY_SCALE-group_util)
* ((sg->sge->cap_states[cap_idx].power
* sg->sge->idle_states[idle_idx].power)
>> SCHED_CAPACITY_SHIFT)
);

total_energy += sg_busy_energy + sg_idle_energy;

Expand Down

0 comments on commit 8342882

Please sign in to comment.