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]
Date:	Wed, 20 Jan 2016 20:29:52 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Nicolas Pitre <nicolas.pitre@...aro.org>
Cc:	Daniel Lezcano <daniel.lezcano@...aro.org>, tglx@...utronix.de,
	rafael@...nel.org, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, vincent.guittot@...aro.org
Subject: Re: [RFC V2 2/2] sched: idle: IRQ based next prediction for idle
 period

On Wed, Jan 20, 2016 at 02:17:57PM -0500, Nicolas Pitre wrote:
> > It is also a friggin pointless /1000. The cpuidle code also loves to do
> > this, and its silly, u64 add/sub are _way_ cheaper than u64 / 1000.
> 
> For the purpose of this code, nanoseconds simply provides too many bits 
> for what we care.  Computing the variance implies squared values.
> 
> *However* we can simply do diff = (timestamp - w->timestamp) >> 10 
> instead.  No need to have an exact microsecs base.

Right, you could also reduce bits at the variance computation, but yes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ