Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4214096pxb; Tue, 10 Nov 2020 10:33:08 -0800 (PST) X-Google-Smtp-Source: ABdhPJxCSaGGuVAS0PzUHPjPnB7qc/xSt20V1fPOwafGjhYMSVu9TORNvDTS1AbEb7W/Ozc+MNEN X-Received: by 2002:a50:fd98:: with SMTP id o24mr739899edt.0.1605033188118; Tue, 10 Nov 2020 10:33:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605033188; cv=none; d=google.com; s=arc-20160816; b=zXSkgTtOA92PsPvYJLVsHpvtogSArTe2BH1toUDTqmK2I4u3Vv4wO8p35ZBdBfe4Ep kQ2J+E7wBhlcCLoQWetl/CqTUqnDCInQLZNpui3THz94Z48cxW5l6QE6lBeN0S20YvNa 6EYqI98mXttDjSEPFlky84hl8jJC2CT87RUBFskRMw4ffVtCVeDLKXJETDdDnVmqNzxF H59dA8C3XmIAz2i5zd56LvPiZoXLKxQTDepYJNymFeqn00sKrbLdFLM1U5zg+uKlmJwn XmidHO3IRTiDho4iaQjnnmbubYO0cmKcyQsgRI+I1hl9dNSrJs7Glde/C19tGACz0pZ3 aHgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Xo3Rm8xDaIJaxTb/pbAvyQZ+pZQO8oq2ck22PFiPeCQ=; b=kc6I4Dl6bbEIgf0yXctsUJWzhXVt4y9S1+yFDSBKEQoTGh4LF3K+LY2fK4KZzlc9G2 ba7hWq6YxcoQbf+pQfo4vW718U1UZjNdF1WGxyBdo4n1cuMqqpT2SrA3t16cTFLubbLu lvLxluNlpRssZF+JOB8j9/5nezTI6TYwmvVpC2VeVfhfwX7bLIXwdGWpjv4x3+uBsgqA Ps5MzdDiRjN946oZUkMMKOexvcdyhcTv+LzFawT+vDTIQuvFJLYKTy1tD8+tt3QEEDiL EWSo+AWRZiAkYRmMYY2G90Yw27WQI1xGty77iBJmIWxIxlVIFJag3jb69vkkjf+Jmy5/ yz5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qx1si10182627ejb.251.2020.11.10.10.32.42; Tue, 10 Nov 2020 10:33:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731437AbgKJSbL (ORCPT + 99 others); Tue, 10 Nov 2020 13:31:11 -0500 Received: from mx2.suse.de ([195.135.220.15]:34680 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731268AbgKJSbJ (ORCPT ); Tue, 10 Nov 2020 13:31:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 10790AC75; Tue, 10 Nov 2020 18:31:08 +0000 (UTC) From: Giovanni Gherdovich To: Borislav Petkov , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Len Brown , "Rafael J . Wysocki" Cc: Jon Grimm , Nathan Fontenot , Yazen Ghannam , Thomas Lendacky , Mel Gorman , Pu Wen , Viresh Kumar , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Doug Smythies , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Giovanni Gherdovich Subject: [PATCH v2 3/3] x86: Print ratio freq_max/freq_base used in frequency invariance calculations Date: Tue, 10 Nov 2020 19:30:54 +0100 Message-Id: <20201110183054.15883-4-ggherdovich@suse.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110183054.15883-1-ggherdovich@suse.cz> References: <20201110183054.15883-1-ggherdovich@suse.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The value freq_max/freq_base is a fundamental component of frequency invariance calculations. It may come from a variety of sources such as MSRs or ACPI data, tracking it down when troubleshooting a system could be non-trivial. It is worth saving it in the kernel logs. # dmesg | grep 'Estimated ratio of average max' [ 14.024036] smpboot: Estimated ratio of average max frequency by base frequency (times 1024): 1289 Signed-off-by: Giovanni Gherdovich --- arch/x86/kernel/smpboot.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 5a8b941e79fe..2f04c98dcbff 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -2110,6 +2110,7 @@ static void init_freq_invariance(bool secondary, bool cppc_ready) if (ret) { init_counter_refs(); static_branch_enable(&arch_scale_freq_key); + pr_info("Estimated ratio of average max frequency by base frequency (times 1024): %llu\n", arch_max_freq_ratio); } else { pr_debug("Couldn't determine max cpu frequency, necessary for scale-invariant accounting.\n"); } -- 2.26.2