Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752922Ab3CROlC (ORCPT ); Mon, 18 Mar 2013 10:41:02 -0400 Received: from mail-la0-f41.google.com ([209.85.215.41]:63763 "EHLO mail-la0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890Ab3CROk7 (ORCPT ); Mon, 18 Mar 2013 10:40:59 -0400 MIME-Version: 1.0 In-Reply-To: <20130317230812.GE4977@n2100.arm.linux.org.uk> References: <20130315181449.GX4977@n2100.arm.linux.org.uk> <20130317200543.GA20174@mudshark.cambridge.arm.com> <20130317230812.GE4977@n2100.arm.linux.org.uk> Date: Mon, 18 Mar 2013 22:40:56 +0800 Message-ID: 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. From: chpoph To: Russell King - ARM Linux Cc: Will Deacon , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , Viresh Kumar , Nicolas Pitre , Liviu Dudau , Greg Kroah-Hartman Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 930 Lines: 19 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. I think there are four reasons: the task scheduling, IRQ handling, memory accessing, and udelay may be called between CPU frequency changing and loops_per_jiffy changing. The system's performance decreased greatly after adding preempt_{enable, disable}. I used the current timer to delay a time period at last, the timer's frequency is constant. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/