Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3830980pxb; Tue, 10 Nov 2020 00:44:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzDW/NL6QJK4gpWcVZbsOyu2mw+XoSgkrEnev1sVKchqm9LJlKEkojlWDdC8Mz78aXpv0FQ X-Received: by 2002:a50:b224:: with SMTP id o33mr19042798edd.21.1604997843347; Tue, 10 Nov 2020 00:44:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604997843; cv=none; d=google.com; s=arc-20160816; b=vICfxg2DndrpDAVODoPToAoHR+En2GG9aBAt0e0hwtOjvqX5sIuBQU4vZcZ91NJHrm UTdltnS1BhpgD3iPnIG0FyMGrGs5bitcyW/562lseAoXdKJbkqPwuV/+2GwV8dtbFUhe H3msj9TXoN/S+mtqH+r/GKiHR9Au+IVI7T1+CNxCeRjqj4J0oVZKVWJ3S4DChZLqGgNc 2Z4PY5RD0J/YHGjzrEY7dtyxAzJAlpDeWY03ifqGVqk05ejtCVFg4q05xqH6/roKUCN3 Bmobvevq68dOGsiIUVBc9fRI7aKXA0OZjMN0SXAfcoQYAvWzkZlnUU0CxNgWjp5etWI4 WwXw== 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=FCsFA/lHreiBp02StIUT+5qbUP+WF/mnEfnI+3e3cM0=; b=CvkM2lHKptsEqkI+2HPP4pbgMNFiesD92egXh9Foh11FB73Ufqe8kXuFx8blrN0jHQ QK5RdKEUjcg4iMmEEMwV8QADJGDlHcupYJY296gdZnJQSQQUimsIqMyjy6vOPU5ZZ6Ll RePvBFvPFsp0unqJLD2B3Ms0JwqGCHyTLXdy0Ar30anrYtLM7i+gy6hZ31IEapX3BYwk w0pKmfAMggYDcyh54QF+NaHoNngxMYc6emnaoX8s9GADwY97BSTpwg03TBJie0bwBK8F 0/oY4E5akoG4FIAx6swUPY+p32X0f841LnOkg9nHnn7ygRr8uKdFgCak6n4nxdrAEXA7 prVA== 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 hh9si9074414ejb.38.2020.11.10.00.43.39; Tue, 10 Nov 2020 00:44:03 -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 S1729975AbgKJIjz (ORCPT + 99 others); Tue, 10 Nov 2020 03:39:55 -0500 Received: from mx2.suse.de ([195.135.220.15]:48696 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727483AbgKJIjv (ORCPT ); Tue, 10 Nov 2020 03:39:51 -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 E2430AEAA; Tue, 10 Nov 2020 08:39:49 +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 3/3] x86: Print ratio freq_max/freq_base used in frequency invariance calculations Date: Tue, 10 Nov 2020 09:39:36 +0100 Message-Id: <20201110083936.31994-4-ggherdovich@suse.cz> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110083936.31994-1-ggherdovich@suse.cz> References: <20201110083936.31994-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 1e6fed437b0c..ad0647b2d7c3 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(NULL); 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