From patchwork Tue Nov 10 08:39:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Giovanni Gherdovich X-Patchwork-Id: 321086 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6F03C55ABD for ; Tue, 10 Nov 2020 08:39:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 85B9620780 for ; Tue, 10 Nov 2020 08:39:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728478AbgKJIjt (ORCPT ); Tue, 10 Nov 2020 03:39:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:48512 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727483AbgKJIjt (ORCPT ); Tue, 10 Nov 2020 03:39:49 -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 93DC0AE12; Tue, 10 Nov 2020 08:39:47 +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 0/3] Add support for frequency invariance to AMD EPYC Zen2 Date: Tue, 10 Nov 2020 09:39:33 +0100 Message-Id: <20201110083936.31994-1-ggherdovich@suse.cz> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org This series adds support for frequency invariant accounting on AMD EPYC Zen2 (aka "Rome"). The first patch by Nathan lays out the foundation by querying ACPI infrastructure for the max boost frequency of the system. Specifically, this value is available via the CPPC machinery; the previous EPYC generation, namely Zen aka "Naples", doesn't implement that and frequency invariance won't be supported. The second patch sets the estimate for freq_max to be the midpoint between max_boost and max_P, as that works slightly better in practice. A side effect of this series is to provide, with the invariant schedutil governor, a suitable baseline to evaluate a (still work-in-progress) CPPC-based cpufreq driver for the AMD platform (see https://lore.kernel.org/lkml/cover.1562781484.git.Janakarajan.Natarajan@amd.com if/when it will resubmitted. Giovanni Gherdovich (2): x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC x86: Print ratio freq_max/freq_base used in frequency invariance calculations Nathan Fontenot (1): x86, sched: Calculate frequency invariance for AMD systems arch/x86/include/asm/topology.h | 8 ++++ arch/x86/kernel/smpboot.c | 79 +++++++++++++++++++++++++++++---- drivers/acpi/cppc_acpi.c | 5 +++ 3 files changed, 84 insertions(+), 8 deletions(-)