Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1120977pxb; Thu, 4 Feb 2021 05:44:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhgTIKdRFiJQLRRCjjceK8gLaAIi8FZmTYk7UWC4YNsEaVYTafbo/ZrRMPtqPmqRzMB+/F X-Received: by 2002:a17:906:2a42:: with SMTP id k2mr7929673eje.118.1612446298079; Thu, 04 Feb 2021 05:44:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612446298; cv=none; d=google.com; s=arc-20160816; b=i7quRtEabLFRZGKNhIvK1KI+nmruAmi6rlmHmj6NDHXO2wA0poTRDmZ4aqeXSHt30A zEQWgpPxLnCYyzpGL/ZRK3d4K0hdmiqDm9kE3SWrSXpFAqHq+2K+DgxAg3YKqIOLu8aC dzGw7pYZVkx2FZA8tj46ZCxFvECSQFpTWz0c0cIf7mki+RiF3RlX1fsdYzjW6SDsEJlb VP4EJATaDajUDVVx4mT4shZzjBttup3JBPYb2r2ZSVvo2w/VncdiW+09G7aFfPipG3Yh 84FseVM9oficEJ24bxdFL0/c8ocI+Dqubt93doYD6PrX2tfDl5qz8pe19i7XerGCX2gg q9qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=p0rPFw1h6YFddKGACdjtDmU63njD588yrFe74MomORc=; b=IrUzMtwv56iY53Znkf3Wlb+Byw3c/86WEYN+4tucKynB0hjbSp7UbObS5eAL93xGHq Yd8dBBAyEuBMPtT6GZgfR/gOq0lO9VFON6XZU19r13P0SlL9GRtvWqzlR5YhYe6qWHYX TA6ZhjXVy/OPd50rpMHYlZKQZLgFu574vR3WHsAlpGf6JxXGss5VtPCndNZ1/i/xqdMk sTpA7FYZrf1kSGqVq8q9Qp0viEx/abrSeiUdlnMAGff3i+GyX+kLO4rm7D0vRX006Op4 pVhEwKNl1sAZcl9A+0PyPqjlLI6IKBN2qeSWbQ/Jw09APyfrAuGJ1bczo13JH8sMtum1 i9Bw== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y8si3436424edp.207.2021.02.04.05.44.31; Thu, 04 Feb 2021 05:44:58 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236371AbhBDNmp (ORCPT + 99 others); Thu, 4 Feb 2021 08:42:45 -0500 Received: from mail-oi1-f174.google.com ([209.85.167.174]:38469 "EHLO mail-oi1-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236407AbhBDNlY (ORCPT ); Thu, 4 Feb 2021 08:41:24 -0500 Received: by mail-oi1-f174.google.com with SMTP id h6so3726847oie.5; Thu, 04 Feb 2021 05:41:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p0rPFw1h6YFddKGACdjtDmU63njD588yrFe74MomORc=; b=k97M7S+vde8+8YaFotBh2RdNhOYR6zvRBQBe9o+pThy6H4mr5gGVBqt00TPWEgHLvj GVXQe2hPS+HzZoUMvwhpTYiasqayBX6DougXOtVUVzp+IwOLlp1lk+OMMmj3zzcF4CVW 4fDZUI40ZP2ykLbu9qlqq0TI2uMuyXkLOd7vS0wbSe4lUunK2iQgcNZGWmgAKY98r9Lt PPlN3368B6u2wFtMi2dbw3te8Zg0mMLp9I15BQ6OdRvsmql2XZZ4pFiLp7P00RyMCXfd FaNTDZkTdCGtjmVr+nTrVH9tzoumuOw/8P8VtDBivLWSWJSa3tjvoJ+OjUZAffHTLxc6 wmUg== X-Gm-Message-State: AOAM5329nLn/5TjWHt5TOhkAVYMgFND9gvQYVes/uV7f7xx/sERjUMeJ L27tLlya4GjxUhl0Arv4dKT9+K6l90rw3oy0XSY= X-Received: by 2002:aca:d14:: with SMTP id 20mr5312384oin.157.1612446042645; Thu, 04 Feb 2021 05:40:42 -0800 (PST) MIME-Version: 1.0 References: <20210203135321.12253-1-ggherdovich@suse.cz> <20210203135321.12253-2-ggherdovich@suse.cz> <5470319.60Xv9dOaFs@kreacher> <563fec57-6417-e875-1788-3773cbfb34be@phoronix.com> In-Reply-To: <563fec57-6417-e875-1788-3773cbfb34be@phoronix.com> From: "Rafael J. Wysocki" Date: Thu, 4 Feb 2021 14:40:30 +0100 Message-ID: Subject: Re: [PATCH v3 1/1] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula To: Michael Larabel Cc: "Rafael J. Wysocki" , Giovanni Gherdovich , "Rafael J. Wysocki" , Borislav Petkov , Ingo Molnar , Peter Zijlstra , Viresh Kumar , Jon Grimm , Nathan Fontenot , Yazen Ghannam , Thomas Lendacky , Suthikulpanit Suravee , Mel Gorman , Pu Wen , Juri Lelli , Vincent Guittot , Dietmar Eggemann , "the arch/x86 maintainers" , Linux PM , Linux Kernel Mailing List , ACPI Devel Maling List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 4, 2021 at 12:36 AM Michael Larabel wrote: > > On 2/3/21 12:25 PM, Rafael J. Wysocki wrote: > > On Wednesday, February 3, 2021 3:11:37 PM CET Rafael J. Wysocki wrote: > >> On Wed, Feb 3, 2021 at 2:53 PM Giovanni Gherdovich wrote: > >> [cut] > >> > >>> Fixes: 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems") > >>> Fixes: 976df7e5730e ("x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC") > >>> Reported-by: Michael Larabel > >>> Tested-by: Michael Larabel > >>> Signed-off-by: Giovanni Gherdovich > >>> --- > >>> drivers/cpufreq/acpi-cpufreq.c | 61 ++++++++++++++++++++++++++++++-- > >>> drivers/cpufreq/cpufreq.c | 3 ++ > >>> include/linux/cpufreq.h | 5 +++ > >>> kernel/sched/cpufreq_schedutil.c | 8 +++-- > >> I don't really think that it is necessary to modify schedutil to > >> address this issue. > > So below is a prototype of an alternative fix for the issue at hand. > > > > I can't really test it here, because there's no _CPC in the ACPI tables of my > > test machines, so testing it would be appreciated. However, AFAICS these > > machines are affected by the performance issue related to the scale-invariance > > when they are running acpi-cpufreq, so what we are doing here is not entirely > > sufficient. > > > I have benchmarks running on several Ryzen and EPYC systems with this > patch. The full batch of tests won't be done until tomorrow, but in > looking at the data so far from an AMD EPYC 7F72 2P server over the past > few hours, this patch does provide fairly comparable numbers to > Giovanni's patch. There were a few outliers so far but waiting to see > with the complete set of results. At the very least it's clear enough > already this new patch is at least an improvement over the current 5.11 > upstream state with schedutil on AMD. Thanks for the feedback, much appreciated! Let me submit the patch properly, then.