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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56F5268D.70000@linaro.org>
Date:	Fri, 25 Mar 2016 12:52:45 +0100
From:	Daniel Lezcano <daniel.lezcano@...aro.org>
To:	Jisheng Zhang <jszhang@...vell.com>, linux@....linux.org.uk
Cc:	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] ARM: cpuidle: make arm_cpuidle_suspend() a bit more
 efficient

On 03/24/2016 06:11 AM, Jisheng Zhang wrote:
> Currently, we check cpuidle_ops.suspend every time when entering a
> low-power idle state. But this check could be avoided in this hot path
> by moving it into arm_cpuidle_init() to reduce arm_cpuidle_suspend()
> overhead a bit.
>
> Signed-off-by: Jisheng Zhang <jszhang@...vell.com>
> ---
>   arch/arm/kernel/cpuidle.c | 8 ++------
>   1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm/kernel/cpuidle.c b/arch/arm/kernel/cpuidle.c
> index f108d8f..bf68d49 100644
> --- a/arch/arm/kernel/cpuidle.c
> +++ b/arch/arm/kernel/cpuidle.c
> @@ -52,13 +52,9 @@ int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
>    */
>   int arm_cpuidle_suspend(int index)
>   {
> -	int ret = -EOPNOTSUPP;
>   	int cpu = smp_processor_id();
>
> -	if (cpuidle_ops[cpu].suspend)
> -		ret = cpuidle_ops[cpu].suspend(index);
> -
> -	return ret;
> +	return cpuidle_ops[cpu].suspend(index);
>   }

I agree with the optimization but, same comment than the previous patch, 
it should be handled in arm_cpuidle_read_ops.

-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ