lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49c159b6-ebd7-e5fc-29ca-70a1e3dcf0f1@arm.com>
Date:   Fri, 30 Apr 2021 12:13:01 +0100
From:   Lukasz Luba <lukasz.luba@....com>
To:     Pierre.Gondois@....com
Cc:     linux-kernel@...r.kernel.org, xuewen.yan@...soc.com,
        qperret@...rret.net, dietmar.eggemann@....com,
        Vincent.Donnefort@....com, mingo@...hat.com, peterz@...radead.org,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
        bristot@...hat.com
Subject: Re: [PATCH v2 2/2] sched/fair: Fix negative energy delta in
 find_energy_efficient_cpu()



On 4/29/21 11:19 AM, Pierre.Gondois@....com wrote:
> From: Pierre Gondois <Pierre.Gondois@....com>
> 
> find_energy_efficient_cpu() (feec()) searches the best energy CPU
> to place a task on. To do so, compute_energy() estimates the energy
> impact of placing the task on a CPU, based on CPU and task utilization
> signals.
> 
> Utilization signals can be concurrently updated while evaluating a
> performance domain (pd). In some cases, this leads to having a
> 'negative delta', i.e. placing the task in the pd is seen as an
> energy gain. Thus, any further energy comparison is biased.
> 
> In case of a 'negative delta', return prev_cpu since:
> 1. a 'negative delta' happens in less than 0.5% of feec() calls,
>     on a Juno with 6 CPUs (4 little, 2 big)
> 2. it is unlikely to have two consecutive 'negative delta' for
>     a task, so if the first call fails, feec() will correctly
>     place the task in the next feec() call
> 3. EAS current behavior tends to select prev_cpu if the task
>     doesn't raise the OPP of its current pd. prev_cpu is EAS's
>     generic decision
> 4. prev_cpu should be preferred to returning an error code.
>     In the latter case, select_idle_sibling() would do the placement,
>     selecting a big (and not energy efficient) CPU. As 3., the task
>     would potentially reside on the big CPU for a long time
> 
> Reported-by: Xuewen Yan <xuewen.yan@...soc.com>
> Suggested-by: Xuewen Yan <xuewen.yan@...soc.com>
> Signed-off-by: Pierre Gondois <Pierre.Gondois@....com>
> ---
>   kernel/sched/fair.c | 28 ++++++++++++++++------------
>   1 file changed, 16 insertions(+), 12 deletions(-)
> 


Reviewed-by: Lukasz Luba <lukasz.luba@....com>

Regards,
Lukasz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ