From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755213AbdKOAG6 (ORCPT ); Tue, 14 Nov 2017 19:06:58 -0500 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:46163 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751105AbdKOAGt (ORCPT ); Tue, 14 Nov 2017 19:06:49 -0500 From: "Rafael J. Wysocki" To: Thomas Gleixner Cc: Linus Torvalds , 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" Subject: Re: [PATCH] x86: use cpufreq_quick_get() for /proc/cpuinfo "cpu MHz" again Date: Wed, 15 Nov 2017 01:06:37 +0100 Message-ID: <1640278.1Q7Qv8A4h4@aspire.rjw.lan> In-Reply-To: References: <20171109103814.70688-1-chao.wang@ucloud.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, November 15, 2017 12:53:24 AM CET Thomas Gleixner wrote: > On Tue, 14 Nov 2017, Linus Torvalds wrote: > > > On Tue, Nov 14, 2017 at 2:47 PM, Rafael J. Wysocki wrote: > > > > > > So what about the one below? It works for me as expected. > > > > Can somebody with 100+ cores test this? Ingo? You had a 160 core > > machine that took forever, didn't you.. > > On a 144 CPUs machine: > > time cat /proc/cpuinfo >/dev/null > > Current head: > > real 0m0.003s > user 0m0.000s > sys 0m0.002s > > Current head + Raphaels patch: > > real 0m0.029s > user 0m0.000s > sys 0m0.010s > > So that patch is actually slower. Thanks for testing! It is adding a delay (mostly because it has to allow APERF and MPERF to grow somewhat for the frequency computation to produce a useful result), so it will be slower even in theory, but really the question is whether or not the slow down is acceptable. It doesn't look horrible to me, but that's my patch after all. :-)