ANDROID: sched/fair: Cleanup cpu_util{_wake}()
The current implementation of cpu_util and cpu_util_wake makes more difficult the backporting of mainline patches and it also has some features not longer required by the current EAS code, e.g. delta utilization in __cpu_util(). Let's clean up these functions definitions to: 1. get rid of the not longer required __cpu_util(cpu, delta) This function is now only called with delta=0 and thus we can refold its implementation into the original wrapper function cpu_util(cpu) 2. optimize for the WALT path on CONFIG_SCHED_WALT builds Currently indeed we execute some not necessary PELT related code even when WALT signals are required. Let's change this by assuming that on CONFIG_SCHED_WALT build we are likely using WALT signals. While on !CONFIG_SCHED_WALT we still have just the PELT signals with a code structure which matches mainline 3. move the definitions from sched/sched.h into sched/fair.c This is the only module using these functions and it also better align with the mainline location for these functions 4. get rid of the walt_util macro That macro has a function-like signature but it's modifying a parameter (passed by value) which makes it a bit confusing. Moreover, the usage of the min_t() macro to cap signals with capacity_orig_of() it makes not more required the explicit type cast used by that macro to support both 32 and 63 bits targets. 5. remove forward declarations Which are not required once the definition is moved at the top of fair.c, since they don't have other local dependencies. Signed-off-by:Patrick Bellasi <patrick.bellasi@arm.com> Change-Id: I61c9b7b8a0a34b494527c5aa76218c64543c16d2 Git-commit: 2bd47d3f Git-repo: https://android.googlesource.com/kernel/common/ [satyap@codeaurora.org: 1. Update cpu_util() and cpu_util_freq() as needed and keep the functionality in kernel/sched/sched.h instead of moving to kernel/sched/fair.c 2. Replace cpu_util_freq_pelt() with cpu_util() ] Signed-off-by:
Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Loading
Please register or sign in to comment