From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755672AbaEHU5M (ORCPT ); Thu, 8 May 2014 16:57:12 -0400 Received: from gw-1.arm.linux.org.uk ([78.32.30.217]:41205 "EHLO pandora.arm.linux.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754628AbaEHU5L (ORCPT ); Thu, 8 May 2014 16:57:11 -0400 Date: Thu, 8 May 2014 21:55:56 +0100 From: Russell King - ARM Linux To: Doug Anderson Cc: Nicolas Pitre , Viresh Kumar , "Rafael J. Wysocki" , Will Deacon , John Stultz , David Riley , "olof@lixom.net" , Sonny Rao , Richard Zhao , Santosh Shilimkar , Shawn Guo , Stephen Boyd , Marc Zyngier , Stephen Warren , Paul Gortmaker , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] ARM: Don't ever downscale loops_per_jiffy in SMP systems Message-ID: <20140508205556.GJ3693@n2100.arm.linux.org.uk> References: <1399504982-31181-1-git-send-email-dianders@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.19 (2009-01-05) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 08, 2014 at 11:06:24AM -0700, Doug Anderson wrote: > I guess I would say that my patch is unhacking the this code. The > code after my patch is simpler. I would perhaps argue that (ec971ea > ARM: add cpufreq transiton notifier to adjust loops_per_jiffy for smp) > should never have landed to begin with. That depends on your point of view. As I've already pointed out through the examples of why udelay() is inaccurate, for driver authors, they should assume that udelay() just gives you an "approximate" delay and it has no accuracy. When you start from that point, rather than (as you seem to be) believing that it has some kind of accuracy, then the implementation of scaling the loops_per_jiffy is entirely reasonable - it's a best effort implementation. Again, just use a timer for your udelay() implementation. -- FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.