lkml.org 
[lkml]   [2022]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v9 6/7] sched/fair: Remove task_util from effective utilization in feec()
- Vincent Donnefort <vincent.donnefort@arm.com>

On 23/05/2022 17:51, Vincent Donnefort wrote:
> From: Vincent Donnefort <vincent.donnefort@arm.com>

[...]

> @@ -6834,22 +6887,36 @@ static int find_energy_efficient_cpu(struct task_struct *p, int prev_cpu)
> if (!task_util_est(p))
> goto unlock;
>
> + eenv_task_busy_time(&eenv, p, prev_cpu);
> +
> for (; pd; pd = pd->next) {
> - unsigned long cur_delta, spare_cap, max_spare_cap = 0;
> + unsigned long cpu_cap, cpu_thermal_cap, util;
> + unsigned long cur_delta, max_spare_cap = 0;
> bool compute_prev_delta = false;
> unsigned long base_energy_pd;
> int max_spare_cap_cpu = -1;
>
> cpumask_and(cpus, perf_domain_span(pd), cpu_online_mask);

Internal EAS testing of this patch-set version has revealed that this
doesn't work against LTP CPU hotplug stress test. `struct cpumask *cpus`
can't be used when it is empty. This can happen in case all PD CPUs are
hotplugged out since we `and` the invariant PD cpumask with
cpu_online_mask. We need a:

+ if (cpumask_empty(cpus))
+ continue;
+

here.

> - for_each_cpu_and(cpu, cpus, sched_domain_span(sd)) {
> + /* Account thermal pressure for the energy estimation */
> + cpu = cpumask_first(cpus);
> + cpu_thermal_cap = arch_scale_cpu_capacity(cpu);
> + cpu_thermal_cap -= arch_scale_thermal_pressure(cpu);

[...]

\
 
 \ /
  Last update: 2022-05-31 10:18    [W:0.133 / U:0.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site