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] [day] [month] [year] [list]
Date:	Mon, 18 Mar 2013 15:25:14 +0000
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	chpoph <chpoph@...il.com>
Cc:	Will Deacon <will.deacon@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>,
	Nicolas Pitre <nico@...aro.org>,
	Liviu Dudau <Liviu.Dudau@....com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: udelay function delays the wrong time interval in
	multiprocessor system, if ARCH_HAS_READ_CURRENT_TIMER is not
	defined and on current timer is used.

On Mon, Mar 18, 2013 at 10:40:56PM +0800, chpoph wrote:
>  On Sun, Mar 17, 2013 at 08:05:43PM +0000, Will Deacon wrote:
> >Do you actually have an ARM platform that can scale the CPU frequencies
> independently?
> 
> Yes,  my smart phone use Qualcomm's 8x25 and 8064 platform, which can
> scale the CPU frequencies independently. I test the delay loop, the
> phone can't get accurate delayed time intervals.

That is expected.  udelay() is only approximate.  Sometimes, it will give
you a slightly shorter delay than asked for, or if preempted, it can give
you a much longer delay - because it has no idea how long it has been
preempted for.

This is why in a SMP system it is much better to use a timer-based udelay()
implementation which is more independent of these effects.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ