Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp704656pxb; Wed, 20 Jan 2021 19:17:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbAXdaL75Wsl57Q5wke21Lul2e8PoZOZfqTGc23ygsVqWNV7T/vYG239KSG4YEwwbkDcRi X-Received: by 2002:aa7:d0cf:: with SMTP id u15mr9576957edo.115.1611199030225; Wed, 20 Jan 2021 19:17:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1611199030; cv=none; d=google.com; s=arc-20160816; b=SsusWKVbhoOl3n1jGt/drgSlPpi+W7Yy3o4BiGd4qdVB4csWD+Yz7KcmgDTzSn7q3B DWC+txfWj9uLY4EH2JGenNBjBT57ndHbz1qxi6N5CeB2wJ21lsvA7Bw9UTu2LhXJlgFQ kzaaRt5QkfbzS6RagkcBGnNMruFwmHqkiGWPTrl7ymWVnNMexGwy1LUxnmvpuyz5EdNd p1N+sueI2x2IVW9I4+ceQmWlGzSVR80Cny4xuVJZb13UhMvtt/sY/Abreiem60i/NXNa aeklodGM2MD50rXpZYWwyq4ylCQOu3U33cc0MWAQ4pqAjn+2IOr+SIa5CYuWcDWTaVA4 l+Uw== 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:date:cc:to:from:subject:message-id; bh=qPWF0uMHDQzFs/0w2VvjPZ/hQFF9NEJbY287KyvEXn0=; b=A2+bfe7gMdJVxc8Ych0o3SSQaspS/nbtJRDC+s3NAbLm5Pl+7WiAs/noR/uAU+vsT9 n2c4MS/igFLgZLAT5O2MDxCFT3NNledryixYNbiYAnEsn7QehfpJF3o6WKODA2Jqzvme j41sB6LyqvPGcAuRdaQpEdiuo8lfRKMUxVkTTtgInnRlTMzCZ0lPVdLWeeeRhBq7egLz c35E8dFtmw3bsUZPIf6Vyei0jwdTkAD3HwDVTo9FpqUTiMy7CKmdDfHrvoaEpaN04fuC CocZyYq6KzAekAru0G5WgQFh2q/of+f7+zotS5vS8xuwhVp1kL16KtKVZvHarjMCw/DG zQDg== 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 jg4si1292772ejc.313.2021.01.20.19.16.47; Wed, 20 Jan 2021 19:17:10 -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 S2390867AbhAUBL7 (ORCPT + 99 others); Wed, 20 Jan 2021 20:11:59 -0500 Received: from mx2.suse.de ([195.135.220.15]:46172 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391847AbhAUBJ4 (ORCPT ); Wed, 20 Jan 2021 20:09:56 -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 04A5EAC95; Thu, 21 Jan 2021 01:09:15 +0000 (UTC) Message-ID: <1611191354.18842.7.camel@suse.cz> Subject: Re: [PATCH] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula From: Giovanni Gherdovich To: Borislav Petkov , Ingo Molnar , Peter Zijlstra , "Rafael J . Wysocki" , Viresh Kumar Cc: Jon Grimm , Nathan Fontenot , Yazen Ghannam , Thomas Lendacky , Suthikulpanit Suravee , Mel Gorman , Pu Wen , Juri Lelli , Vincent Guittot , Dietmar Eggemann , x86@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Date: Thu, 21 Jan 2021 02:09:14 +0100 In-Reply-To: <20210121003550.20415-1-ggherdovich@suse.cz> References: <20210121003550.20415-1-ggherdovich@suse.cz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.6 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2021-01-21 at 01:35 +0100, Giovanni Gherdovich wrote: > Phoronix.com discovered a severe performance regression on AMD APYC > introduced on schedutil [see link 1] by the following commits from v5.11-rc1 > > commit 41ea667227ba ("x86, sched: Calculate frequency invariance for AMD systems") > commit 976df7e5730e ("x86, sched: Use midpoint of max_boost and max_P for frequency invariance on AMD EPYC") > > Furthermore commit db865272d9c4 ("cpufreq: Avoid configuring old governors as > default with intel_pstate") from v5.10 made it extremely easy to default to > schedutil even if the preferred driver is acpi_cpufreq. Distros are likely to > build both intel_pstate and acpi_cpufreq on x86, and the presence of the > former removes ondemand from the defaults. This situation amplifies the > visibility of the bug we're addressing. > > [link 1] https://www.phoronix.com/scan.php?page=article&item=linux511-amd-schedutil&num=1 > > 1. PROBLEM DESCRIPTION : over-utilization and schedutil > 2. PROPOSED SOLUTION : raise freq_max in schedutil formula > 3. DATA TABLE : image processing benchmark > 4. ANALYSIS AND COMMENTS : with over-utilization, freq-invariance is lost I've sent this patch twice by mistake, sorry about that. In case it is of interest, I've shared some plots made while studying this regression in a bugzilla entry: https://bugzilla.kernel.org/show_bug.cgi?id=211305 Thanks, Giovanni