Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Unverified Commit eb2732de authored by ldts's avatar ldts Committed by deadman96385
Browse files

arm64: topology: fix cpu power calculation



This commit sets the power of the average CPU in SMP systems to
SCHED_CAPACITY_SCALE.

Ignoring the condition "min_capacity==max_capacity" causes the function
update_cpu_power( .. ) to generate out of range values. This is
because the default value of middle_capacity is used in the final
calculation instead of a valid scaling factor.

Incidentally, when out of range values are generated and if
SCHED_FEAT(ARCH_POWER) is true, the load balancing algorithm makes
incorrect scheduling decisions typically overallocating all the work
on one of the CPU cores.

This proposed solution to arm64 is in line with the upstream solution
present in arm32 since the commit below was merged:

* SHA: 816a8de0017f16c32e747abc5367bf379515b20a
* From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
* Date: Mon, 17 Jun 2013 14:20:00 +0100
* Subject: ARM: topology: remove hwid/MPIDR dependency from cpu_capac

Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Acked-by: default avatarVincent Guittot <vincent.guittot@linaro.org>
Signed-off-by: default avatarKevin Hilman <khilman@linaro.org>
Signed-off-by: default avatarAlex Naidis <alex.naidis@linux.com>
Signed-off-by: default avatarJoe Maples <joe@frap129.org>
parent 5f0af188
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment