Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3830063pxb; Tue, 10 Nov 2020 00:41:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJys0sR2A02sGKyC2Em1CrztQlsWAEHu0Vviiie8RNP/IYgyq0Mwp5taq5cy5FnnqkYPcfrQ X-Received: by 2002:a17:906:6686:: with SMTP id z6mr18590271ejo.554.1604997698328; Tue, 10 Nov 2020 00:41:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604997698; cv=none; d=google.com; s=arc-20160816; b=dZA5eXsuppb76NvtYO7HuU3yGd31/gY2BxKFc5+LrpCtOYeqeGm7Tl04G32t/IaMCl 4sk5CVX9qgtBEOp3U5C3M1UOI7YXIg25TLfp949eN4o/tZgy5hiPSertTGXyw28nUevu IsEDCqyyVco18fNZ9eKcKiFul+XuBi/717c6mA1PJOVX2dR8u49Jye77q03oiJO+PAHC 8kK4KP1sNozmL2ztHznE6+95syzz46vZrS0CDCrYzi/mo57F9ZLCk7xY2knaW+Mf3iNg yO2ZgEPn/POKDdSaV5sWo9jIBRggNnjhYLbrgkg/+0+DBhMJdoWEBicIa2Nt5fDYIsyB TkoA== 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 :message-id:date:subject:cc:to:from; bh=6OVHDiuwpGzGGhZldO+lSJOEGf9tVsQEBEr9W87g1BU=; b=0C04/fIZ9ZpzARxAkzS3JSvscL6RroKRwetF59ckiFc0/kfFx0PT9Li8he5g6gq2j5 qaET+Wc4x1OQ2WLBoxe60hBf4za27O6gmiylNajikxoLWTw8ZMpTJLWWEPV3e7rtZTw/ HrlTs8CGvBS8Ym+uU0WZWbzDJzOwOoXuRFrTurzDPYL+1K4GqRYmHvyY0dHg/2vWiPJ2 /jPTLrB1anYnlSeh9NQVJ/vjs9V2RavGyHK3jHUpGJ9+j9UL3yetyBESEZnPeI/4QOkc FWqw3JSiFjCgM+VyAcnLPEYLMXGKQd6pFnmUCQsXx7QEwUA3RZ1Sja+S49ZrZ2uMlCkB S+6g== 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 h4si2687473edv.124.2020.11.10.00.41.16; Tue, 10 Nov 2020 00:41:38 -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 S1728905AbgKJIju (ORCPT + 99 others); Tue, 10 Nov 2020 03:39:50 -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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) -- 2.26.2