From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Gleixner Subject: Re: [PATCH] x86: use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" again Date: Wed, 15 Nov 2017 19:05:22 +0100 (CET) Message-ID: References: <20171109103814.70688-1-chao.wang@ucloud.cn> <2067351.8xeh6jAbVr@aspire.rjw.lan> <20171115074358.4jf4sjpq4ffmhmpi@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Return-path: Received: from Galois.linutronix.de ([146.0.238.70]:42796 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756208AbdKOSGV (ORCPT ); Wed, 15 Nov 2017 13:06:21 -0500 In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Linus Torvalds Cc: Ingo Molnar , "Rafael J. Wysocki" , WANG Chao , Linux Kernel Mailing List , Ingo Molnar , "H. Peter Anvin" , Vikas Shivappa , Kate Stewart , Len Brown , Greg Kroah-Hartman , Philippe Ombredanne , Mathias Krause , the arch/x86 maintainers , Linux PM , "Rafael J. Wysocki" On Wed, 15 Nov 2017, Linus Torvalds wrote: > On Tue, Nov 14, 2017 at 11:43 PM, Ingo Molnar wrote: > Again, try that "cat" example again, and time it. > > (And yes, I also know that "cpu*/cpufreq" is a symlink, but the direct > names are illogical, and no faster for me. Try it if you like: > > time cat /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq > /dev/null Just for the fun of it I tried. It's exactly the same time as /proc/cpuinfo with the reverted patch which did the full IPI thing, i.e. >4 seconds on that machine. Not a surprise because those files do the full IPI thing as well. Thanks, tglx