(Post the questions here on behalf of Yun Hsiang)
Hi all,
I’d like to ask discuss some questions about uclamp in linux-power.githttp://www.linux-arm.org/git?p=linux-power.git;a=summary.
Code is based on the following version. linux-power.githttp://www.linux-arm.org/git?p=linux-power.git;a=summary tag: topic-util_clamp-20190412
1. If a task clamped utilization is higher than a cpu capacity, should EAS bypass that cpu? kernel/sched/fair.c static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) { … /* Skip CPUs that will be overutilized. */ util = cpu_util_next(cpu, p, cpu); <= Should this util use task clamped utilization? cpu_cap = capacity_of(cpu); if (cpu_cap * 1024 < util * capacity_margin) continue; … }
1. Will uclamp add a kernel-space API to set per-task utilization clamping? Drivers/kernel module can use this API for precise performance/power tuning.
Best regards, Yun
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Hi,
+Patrick on CC
On Friday 17 May 2019 at 08:01:19 (+0000), Zhifei Yang (Arm Technology China) wrote:
(Post the questions here on behalf of Yun Hsiang)
Hi all,
I’d like to ask discuss some questions about uclamp in linux-power.githttp://www.linux-arm.org/git?p=linux-power.git;a=summary.
Code is based on the following version. linux-power.githttp://www.linux-arm.org/git?p=linux-power.git;a=summary tag: topic-util_clamp-20190412
- If a task clamped utilization is higher than a cpu capacity, should EAS bypass that cpu?
kernel/sched/fair.c static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) { … /* Skip CPUs that will be overutilized. */ util = cpu_util_next(cpu, p, cpu); <= Should this util use task clamped utilization? cpu_cap = capacity_of(cpu); if (cpu_cap * 1024 < util * capacity_margin) continue; … }
In short, yes, EAS should take this into account. The upstream uclamp implementation only targets frequency selection for now, as a first step. Patches for biasing task placement will come later, in a second step. But, yes, this is correct, and we have plans to implement this feature.
On a side note, if these questions come in the context of a product development, I just wanted to mention that our current recommendation is to use android kernels rather than the integration branch as a base. Up to android-4.19 schedtune is still the recommended option for products. One of the reasons is indeed that uclamp is not yet feature-complete.
- Will uclamp add a kernel-space API to set per-task utilization clamping?
Drivers/kernel module can use this API for precise performance/power tuning.
ISTR this has already been suggested but I can't recall the detailed outcome of the discussion. Patrick ?
Thank you for the feedback, it is very appreciated.
Regards, Quentin
On Friday 17 May 2019 at 09:43:46 (+0100), Quentin Perret wrote:
Hi,
+Patrick on CC
Now done ...
On Friday 17 May 2019 at 08:01:19 (+0000), Zhifei Yang (Arm Technology China) wrote:
(Post the questions here on behalf of Yun Hsiang)
Hi all,
I’d like to ask discuss some questions about uclamp in linux-power.githttp://www.linux-arm.org/git?p=linux-power.git;a=summary.
Code is based on the following version. linux-power.githttp://www.linux-arm.org/git?p=linux-power.git;a=summary tag: topic-util_clamp-20190412
- If a task clamped utilization is higher than a cpu capacity, should EAS bypass that cpu?
kernel/sched/fair.c static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu) { … /* Skip CPUs that will be overutilized. */ util = cpu_util_next(cpu, p, cpu); <= Should this util use task clamped utilization? cpu_cap = capacity_of(cpu); if (cpu_cap * 1024 < util * capacity_margin) continue; … }
In short, yes, EAS should take this into account. The upstream uclamp implementation only targets frequency selection for now, as a first step. Patches for biasing task placement will come later, in a second step. But, yes, this is correct, and we have plans to implement this feature.
On a side note, if these questions come in the context of a product development, I just wanted to mention that our current recommendation is to use android kernels rather than the integration branch as a base. Up to android-4.19 schedtune is still the recommended option for products. One of the reasons is indeed that uclamp is not yet feature-complete.
- Will uclamp add a kernel-space API to set per-task utilization clamping?
Drivers/kernel module can use this API for precise performance/power tuning.
ISTR this has already been suggested but I can't recall the detailed outcome of the discussion. Patrick ?
Thank you for the feedback, it is very appreciated.
Regards, Quentin _______________________________________________ eas-dev mailing list eas-dev@lists.linaro.org https://lists.linaro.org/mailman/listinfo/eas-dev