Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp4275923pxb; Tue, 10 Nov 2020 12:09:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJwhoeL2/LDQMqzjDN1hikDM2eH8FUdGYVrkK0Y6maetNDMv1p2BrXU3haypvwOB71nC6buo X-Received: by 2002:a17:907:2667:: with SMTP id ci7mr22683741ejc.282.1605038982428; Tue, 10 Nov 2020 12:09:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605038982; cv=none; d=google.com; s=arc-20160816; b=f+51MXnY+Xsjlwaj0JKGhJRljdeIrOXF8G1DwP4qi4cADOFYBZsSrmLhU6ySdL5MnP gDV4pd/eXfyjYUUP3ZcOnUq/5/Kkx+cC+NMC4WY+86Jtq+0u9zEfb5jjiCLWArVOlbXl TCV3ctKtr+Nau16E5bCDbA7bU4rTmPHG7rbY/6mnFQynr+0EXIlo03+SIow43hweJKbZ EvNnSioEaZGoBL4nTkFuHnhuMGXGOLg3EIl7M8Wkq5bs/Y0a6PzZEjfyHz7CJnkrdVO5 Qgn29ykhFj2TR96O7hKxgdewUg6aEOBb5kW2/MXAQvDtq9EBB0ikNPRqMOGhagVglBDb fbxQ== 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=qE49wdjgF3ET/amoeHrrk9ckhJAW3117tDonrYDIUTQ=; b=mRLN44s+hmZWw341RP1E/HUG7v4H15lXil955ZLbBY+xm0xFBLwTvtaKSPKtkkre1J iKejXjf43UI2oF9eVBn2KXE+eK55XSTGKPpUmak8CEdda5ZHQ7zPJDTJLqjW78jbwEID tEjLfrDPWlWq1vdm1ed6xNAW9PZikRrByrpdBO9BYmq+/sDGO5xRsbNAmz2dJsfEwt3k TgUbvLaGhPegDEAsr4TbH0crJgF/oGOrNa7PqsrpBCG6rmvtHKBDKzaxpCfrmxfghzGA qwt44tHSrEFjQuf0VVra6QRDmPS3qn9Xi+cJCIzmMniHuBMGqDSsupa+AxH/4CWacLnE dpMA== 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 a14si12100554edn.216.2020.11.10.12.09.18; Tue, 10 Nov 2020 12:09:42 -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 S1731738AbgKJUFn (ORCPT + 99 others); Tue, 10 Nov 2020 15:05:43 -0500 Received: from mx2.suse.de ([195.135.220.15]:53222 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731608AbgKJUFg (ORCPT ); Tue, 10 Nov 2020 15:05:36 -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 8DCCCAC0C; Tue, 10 Nov 2020 20:05:34 +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 v3 3/3] x86: Print ratio freq_max/freq_base used in frequency invariance calculations Date: Tue, 10 Nov 2020 21:05:19 +0100 Message-Id: <20201110200519.18180-4-ggherdovich@suse.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110200519.18180-1-ggherdovich@suse.cz> References: <20201110200519.18180-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 ed0d02d332cf..7affe6ef0259 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