projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b38ce2b
)
sched: ems: Fix calculate_energy bug
author
lakkyung.jung
<lakkyung.jung@samsung.com>
Mon, 3 Sep 2018 04:37:55 +0000
(13:37 +0900)
committer
Cosmin Tanislav
<demonsingur@gmail.com>
Mon, 22 Apr 2024 17:24:56 +0000
(20:24 +0300)
Change-Id: I13fda72d1a6529c245108da2d34bb6d40688d8cb
Signed-off-by: lakkyung.jung <lakkyung.jung@samsung.com>
kernel/sched/ems/energy.c
patch
|
blob
|
blame
|
history
diff --git
a/kernel/sched/ems/energy.c
b/kernel/sched/ems/energy.c
index 5b98131bc3db68865c2970b856ecd510166c793d..d7a13a35e642eb53587b151dde824e22e27aaf1a 100644
(file)
--- a/
kernel/sched/ems/energy.c
+++ b/
kernel/sched/ems/energy.c
@@
-116,6
+116,12
@@
static unsigned int calculate_energy(struct task_struct *p, int target_cpu)
* cpu usuage that excludes cpu performance.
*/
for_each_cpu(i, cpu_coregroup_mask(cpu)) {
+ if (i == task_cpu(p))
+ util[i] -= min_t(unsigned long, util[i], task_util_est(p));
+
+ if (i == target_cpu)
+ util[i] += task_util_est(p);
+
/* utilization with task exceeds max capacity of cpu */
if (util[i] >= capacity) {
util_sum += SCHED_CAPACITY_SCALE;