Received: by 10.223.164.202 with SMTP id h10csp2115709wrb; Thu, 16 Nov 2017 09:35:20 -0800 (PST) X-Google-Smtp-Source: AGs4zMb9e3zORQdSSXw97xg4rw+2MYx0s2NsrHyBQIDOVCNpNQjQs7hRGzSekGk/BmkwcSvj4/kj X-Received: by 10.99.169.25 with SMTP id u25mr2328550pge.77.1510853720731; Thu, 16 Nov 2017 09:35:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510853720; cv=none; d=google.com; s=arc-20160816; b=VgiSHh+QejYpVVG+dR3EFI0BhaSj9vxvesajBOICi/4uCiQ/SdhOf1N3EhPXicvrBC R8FRIfAR4aj5IWKXQslo0xzsiUH69fNJLK8pDe1iMPq2polF+cIw5J71wLxCQKUIPRtj zsMhhGlzrcTcJndVqhy+G1Xxm6N4qeAT2nUeDbopQQaJLzzejSQHPoEjYD9iBWcjWDVO fz87VAM/5wZuStK64AHeitTpx/SF07L6cLMjstL8NwYky5kPNavtwDeMPs3xsNPwn6VS bl1xYNpB9pVjZq6rY2gwz4zJP+5qVaBCiPLiGDVpS/i4OZY5XLESQTkwNzl0i3rhmU6f jvew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :mime-version:user-agent:date:message-id:from:references:cc:to :subject:arc-authentication-results; bh=pf8QDk9UH8V7IjVfORddNJXXFLR7g7/0f3W7w2TML0w=; b=nZn1wFZBjQQOZl7u915RxX2L7QjueHl2sAINFPELj191wNGeJMaQBMa0qFyztm2PP8 6o7Pwnc2eeKMruppux4IAEXJ+YAECJSqBmtTv2Uv00wp8rjiZ49C5LTa7t48GQydlyfy CFspnnJdRoZBE0/qzEwu6RcMDE3ZvaDC9upkSX3GwolKYTXi4F7Y0O6K8DWcZ7Ra4EUQ BDhlA0xrTh7txPVRZPrJX4WByylmR9bdK9bEaPN9pEPyZETb2DG+lzJfE7+BI96MplkN J2pmgHbHGbdFRbUEoc2Mn/GZgh/5rwxQYM4bZ17uNi72bZqbMTa5nxToE66cqZF4Rf5u 1icg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m15si1178059pga.413.2017.11.16.09.35.07; Thu, 16 Nov 2017 09:35:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934754AbdKPQvU (ORCPT + 92 others); Thu, 16 Nov 2017 11:51:20 -0500 Received: from us-smtp-delivery-107.mimecast.com ([216.205.24.107]:32770 "EHLO us-smtp-delivery-107.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936205AbdKPQvN (ORCPT ); Thu, 16 Nov 2017 11:51:13 -0500 Received: from CPH-EX1.SDESIGNS.COM (195-215-56-170-static.dk.customer.tdc.net [195.215.56.170]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-217-Db1GZLvMPWa0Tv1zmEMwFQ-1; Thu, 16 Nov 2017 11:51:11 -0500 X-MC-Unique: Db1GZLvMPWa0Tv1zmEMwFQ-1 Received: from [172.27.0.114] (172.27.0.114) by CPH-EX1.sdesigns.com (192.168.10.36) with Microsoft SMTP Server (TLS) id 14.3.294.0; Thu, 16 Nov 2017 17:51:06 +0100 Subject: Re: [RFC] Improving udelay/ndelay on platforms where that is possible To: Nicolas Pitre CC: Russell King - ARM Linux , Linus Torvalds , Alan Cox , LKML , Linux ARM , Steven Rostedt , Ingo Molnar , Thomas Gleixner , "Peter Zijlstra" , John Stultz , Douglas Anderson , Mark Rutland , Will Deacon , Jonathan Austin , Arnd Bergmann , Kevin Hilman , Michael Turquette , "Stephen Boyd" , Boris Brezillon , Thibaud Cornic , Mason References: <20171101175325.2557ce85@alans-desktop> <4b707ce0-6067-ab36-e167-1acf348d26bf@free.fr> <11393e07-b042-180c-3bcd-484bf51eada6@sigmadesigns.com> <20171115131351.GE31757@n2100.armlinux.org.uk> <1fa81694-7bd2-564b-e5b9-ae53b9ea6620@sigmadesigns.com> <20171116153625.GJ31757@n2100.armlinux.org.uk> <9a4cfa9d-3940-b7f2-5a4d-59e89af85bb7@sigmadesigns.com> <48c38055-20f7-e565-aa56-74f360e6e3d9@sigmadesigns.com> From: Marc Gonzalez Message-ID: <870aeb80-bbc5-52ed-cca2-3e762e27bfe2@sigmadesigns.com> Date: Thu, 16 Nov 2017 17:51:05 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 SeaMonkey/2.49.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [172.27.0.114] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 16/11/2017 17:47, Nicolas Pitre wrote: > Look at cpufreq_callback() in arch/arm/kernel/smp.c. Are you pointing at the scaling of loops_per_jiffy done in that function? As I wrote earlier: If I'm reading arch/arm/kernel/smp.c correctly, loops_per_jiffy is scaled when the frequency changes. But arch/arm/lib/delay-loop.S starts by loading the current value of loops_per_jiffy, computes the number of times to loop, and then loops. If the frequency increases when the core is in __loop_delay, the delay will be much shorter than requested. From 1584244873179901699@xxx Thu Nov 16 17:34:06 +0000 2017 X-GM-THRID: 1582790467810046578 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread