Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp34167rwb; Thu, 22 Sep 2022 14:01:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5pSYz9Fq0WG4ZX4rDqHWkBeLXj8kNozFRAKFAv8R3izlvrcm1d8aPu34RtS/drJsUfmrjp X-Received: by 2002:a17:907:94c7:b0:780:7ccd:aca7 with SMTP id dn7-20020a17090794c700b007807ccdaca7mr4476962ejc.136.1663880473648; Thu, 22 Sep 2022 14:01:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663880473; cv=none; d=google.com; s=arc-20160816; b=imKpxg2byGBI43t7/DmCzxB0zpy570+XVk731sQFUIoU/4dH/A/MAfe5rsoCKMkbnC coBK5jkT/g+nVEZgMrVot/9aaWuLF5pTtlUvOs8P+tXXD5+Vg2ANxbo6eM8sysYMF22Q GuTK2nM1bfnl2qfcc+M6oXM10ra8CNnwi2advRWk4XQli7NJbqv6BU17UNpZ+Z4/ZbN1 Y0sm2i2jlOO7ZxfdD79GCt1vs9zsdDS6wbwrH/IzHcapFKj42MGSaNeeWUiuXMANEFJ5 59Quc/yjQZqQoyoAN3vGhNajoNc1z4ircAIQn7eJtAyHeTRAoBqCZJsabfr2fvQtnuVv /O3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Qt5JI7YMN9MyBibvKTyMO7gz7ojj2NFGkG0PSwRJMho=; b=lUBBNKeTkaS4HQe/WeKXLVrEfTMEmmx54Vy3BD0eUzrRngDsIzcBv9dpfFaN5grvQP 6wP8gopGweAu5lYx5Hf/tiNCivry50nPzA2Kxg7EVA0+6Vs1SRJTKwshaXge6vAWi/9O y6sClxLsr/vIriP8NvGay1OdHx1s5yaeivYS83psC8KfS/H/0caZDCBrWVawtwpJBBlr 7pUc9sZGo0cB5vmarcZl1/UUN5upbeldBQ87Z7reLd42e153Z+bPypwBx6hvmet5dtrU y2MLmo5FrHHuFgE3rjYs2R7cSQUmygCgYM2UeRnRmRxts1/HYHU3uD+ZMA1gGmxOzbTQ iUcg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gl16-20020a170906e0d000b00741a1203f93si4734892ejb.1009.2022.09.22.14.00.24; Thu, 22 Sep 2022 14:01:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232631AbiIVUBz (ORCPT + 99 others); Thu, 22 Sep 2022 16:01:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229667AbiIVUBW (ORCPT ); Thu, 22 Sep 2022 16:01:22 -0400 X-Greylist: delayed 604 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 22 Sep 2022 13:00:30 PDT Received: from rhlx01.hs-esslingen.de (rhlx01.hs-esslingen.DE [IPv6:2001:7c0:700::10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DA0836781; Thu, 22 Sep 2022 13:00:30 -0700 (PDT) Received: by rhlx01.hs-esslingen.de (Postfix, from userid 102) id A8BA6277FBA8; Thu, 22 Sep 2022 21:42:15 +0200 (CEST) Date: Thu, 22 Sep 2022 21:42:15 +0200 From: Andreas Mohr To: Dave Hansen Cc: K Prateek Nayak , linux-kernel@vger.kernel.org, rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org, linux-pm@vger.kernel.org, dave.hansen@linux.intel.com, bp@alien8.de, tglx@linutronix.de, andi@lisas.de, puwen@hygon.cn, mario.limonciello@amd.com, peterz@infradead.org, rui.zhang@intel.com, gpiccoli@igalia.com, daniel.lezcano@linaro.org, ananth.narayan@amd.com, gautham.shenoy@amd.com, Calvin Ong , stable@vger.kernel.org, regressions@lists.linux.dev Subject: Re: [PATCH] ACPI: processor_idle: Skip dummy wait for processors based on the Zen microarchitecture Message-ID: References: <20220921063638.2489-1-kprateek.nayak@amd.com> <20e78a49-25df-c83d-842e-1d624655cfd7@intel.com> <0885eecb-042f-3b74-2965-7d657de59953@amd.com> <88c17568-8694-940a-0f1f-9d345e8dcbdb@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <88c17568-8694-940a-0f1f-9d345e8dcbdb@intel.com> X-Priority: none X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, Sep 22, 2022 at 10:01:46AM -0700, Dave Hansen wrote: > diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c > index 16a1663d02d4..9f40917c49ef 100644 > --- a/drivers/acpi/processor_idle.c > +++ b/drivers/acpi/processor_idle.c > @@ -531,10 +531,27 @@ static void wait_for_freeze(void) > /* No delay is needed if we are in guest */ > if (boot_cpu_has(X86_FEATURE_HYPERVISOR)) > return; > + /* > + * Modern (>=Nehalem) Intel systems use ACPI via intel_idle, > + * not this code. Assume that any Intel systems using this > + * are ancient and may need the dummy wait. This also assumes > + * that the motivating chipset issue was Intel-only. > + */ > + if (boot_cpu_data.x86_vendor != X86_VENDOR_INTEL) > + return; > #endif > - /* Dummy wait op - must do something useless after P_LVL2 read > - because chipsets cannot guarantee that STPCLK# signal > - gets asserted in time to freeze execution properly. */ 16 years ago, I did my testing on a VIA 8233/8235 chipset (AMD Athlon/Duron) system...... (plus reading VIA spec PDFs which mentioned "STPCLK#" etc.). AFAIR I was doing kernel profiling (via oprofile, IIRC) for painful performance hotspots (read: I/O accesses etc.), and this was one resulting place which I stumbled over. And if I'm not completely mistaken, that dummy wait I/O op *was* needed (else "nice" effects) on my system (put loud and clear: *non*-Intel). So one can see where my profiling effort went (*optimizing* things, not degrading them) --> hints that current Zen3-originating effort is not about a regression in the "regression bug" sense - merely a (albeit rather appreciable/sizeable... congrats!) performance deterioration vs. an optimal (currently non-achieved) software implementation state (also: of PORT-based handling [vs. MWAIT], mind you!). I still have that VIA hardware, but inactive (had the oh-so-usual capacitors issue :( ). Sorry for sabotaging your current fix efforts ;-) - but thank you very much for your work/discussion in this very central/hotpath area! (this extends to all of you...) Greetings Andreas Mohr