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: <20160420121315.GC3408@twins.programming.kicks-ass.net>
Date:	Wed, 20 Apr 2016 14:13:15 +0200
From:	Peter Zijlstra <peterz@...radead.org>
To:	Daniel Lezcano <daniel.lezcano@...aro.org>
Cc:	rjw@...ysocki.net, mingo@...nel.org,
	"open list:CPUIDLE DRIVERS" <linux-pm@...r.kernel.org>,
	open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] cpuidle: Change ktime_get() with local_clock()

On Thu, Apr 14, 2016 at 09:23:54PM +0200, Daniel Lezcano wrote:
> @@ -217,7 +217,11 @@ int cpuidle_enter_state(struct cpuidle_device *dev, struct cpuidle_driver *drv,
>  	if (!cpuidle_state_is_coupled(drv, entered_state))
>  		local_irq_enable();
>  
> -	diff = ktime_to_us(ktime_sub(time_end, time_start));
> +	/*
> +	 * local_clock() returns the time in nanosecond, let's shift
> +	 * by 10 (divide by 1024) to have microsecond based time.
> +	 */
> +	diff = (time_end - time_start) >> 10;

Changelog fails to explain the ramifications of this change...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ