Hi Patrick,
On Mon, Mar 19, 2018 at 12:22:44PM +0000, Patrick Bellasi wrote:
Hi Leo,
thanks for sharing those patches which, since a long time, we know you are working on. I think they go back to our meeting last year in Mountain View...
This is my 4th version for trying to upstream this patch set to Android common kernel since last year's Mountain view meeting; and I will only focus on this patch set so far.
I'm always a bit confused about the proper review channel. Usually we review Android related bits on Google's gerrit...
I want to share out the patch set and get you guy's opinion on it, so we can get to know how to proceed for next step; this is also helpful for Linaro internally consolidation for EAS related works. For this purpose, I think eas-dev is a good place for this.
And sometime I hope this can benefit for some SoC members if they want to try these patches on their own production branch.
If you think this patch set is suitable for merging into AOSP, I am glad to proceed to send them with gerrit.
I'm wondering why you posted this series here while some of the patches are already uploaded on gerrit, e.g.
https://android-review.googlesource.com/c/kernel/common/+/555724
This is a single big patch for all refactoring, as result I found it's hard for reviewing, e.g. Daniel L. took much time to review it and seems it's not easily to understand its underlying idea. So I tried to split the big patch into small patches for easier reviewing.
Another reason is: after the refactoring patch "sched/fair: re-factor energy_diff to use a single (extensible) energy_env" has been merged into android-4.9-eas-dev branch, the energy calculation has been changed significantly, this results in the old patch is impossible to rebase on the latest code base. So I need to totally rework the patch set rather than a simple rebasing.
Anyway, I'll have a fast look at this series and I'm sure you'll have a better change to have a chat about these at Connect too.
Thanks for reviewing.
Thanks, Leo Yan
On 17-Mar 20:05, Leo Yan wrote:
This patch set is to optimize the energy computation on Android kernel android-4.9-eas-dev branch [1];
Patches 0001-0012 are used to refactor the code and some minor optimization, otherwise the task energy computation is hard to landed into current code;
Patch 0013 "sched/fair: Optimize energy computation with task oriented" is the core patch in whole patch set, which is mainly used to implement energy calculation for task. Patch 0014 is a sequential patch to use cached value so we can get more benefit for performance by exchanging more memory.
Patch 0015 is a trival experiment patch to remove 'idle state estimation'.
The testing uses rt-app to generate synthetic workload, the workload duty cycles are 1%/5%/10%/20%/30%/40%; the duration is measured interval for func select_energy_cpu_idx(), which now is used to calculation three candidates in single run. The result shows this patch set improve for energy computation duration:
+----------------+-------+-------+-------+-------+-------+--------+ | workload | 1% | 5% | 10% | 20% | 30% | 40% | +----------------+-------+-------+-------+-------+-------+--------+ | w/o patch set | 17267 | 21227 | 17019 | 13914 | 15002 | 23412 | | w/t patch set | 10823 | 11924 | 10931 | 10785 | 11139 | 11223 | +----------------+-------+-------+-------+-------+-------+--------+ | Opt percentage | 37% | 43% | 36% | 22% | 26% | 52% | +----------------+-------+-------+-------+-------+-------+--------+
The detailed testing ipython notebook you could check [2][3].
[1] https://android.googlesource.com/kernel/common/+/android-4.9-eas-dev [2] https://github.com/Leo-Yan/lisa/blob/2018_03_17_android_4.9_eas_dev_nrg_comp... [3] https://github.com/Leo-Yan/lisa/blob/2018_03_17_android_4.9_eas_dev_nrg_comp...
Leo Yan (15): sched/fair: Prepare energy env cpumask before energy calculation sched/fair: Re-define return values for select_energy_cpu_idx() sched/fair: Reduce indent in select_energy_cpu_brute() sched/fair: Fix one minor typo sched/fair: Use per cpu data to maintain energy environment sched/fair: Use cpumask to track candidates for energy calculation sched/fair: Lift CPU iteration out of calc_sg_energy() sched/fair: Introduce new function compute_task_energy() sched/fair: Decide 'eenv->sg_cap' ahead energy computation sched/fair: Use eenv::sg_cap to select capacity index sched/fair: Estimate capacity index ahead energy computation sched/fair: Refactor compute_energy() sched/fair: Optimize energy computation with task oriented sched/fair: Optimize energy calculation with cached energy data sched/fair: Remove idle state estimation
kernel/sched/fair.c | 542 +++++++++++++++++++++++++--------------------------- 1 file changed, 256 insertions(+), 286 deletions(-)
-- 1.9.1
-- #include <best/regards.h>
Patrick Bellasi