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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]