Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp594531rwb; Fri, 23 Sep 2022 01:07:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM53qNO3W6RSriscgagEf/Z9Grlr4OQcRTw1HG+plu9ntyZd5sYESDe8U4DQ7lCCmYsIHpSw X-Received: by 2002:a17:90b:3752:b0:200:b29b:f592 with SMTP id ne18-20020a17090b375200b00200b29bf592mr8111201pjb.81.1663920447290; Fri, 23 Sep 2022 01:07:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663920447; cv=none; d=google.com; s=arc-20160816; b=0RhBt7oGnJE5XFCaJCu93fIWkKfgUXa2h19iF+nTOTFplndmFc/a6iN7CVaVbc7Zal nJSU4HOGtcu/tyvbA5+gO6iwjwYvgQenAMsHAJkj+jdGYWD6na5MnV7BWXylnVd/Qdh1 MXR0h0UzcHi96yPIVEfZBYzoBgEeyYtGAa7CBv9Bh3B4sVYuox2pd3ACvGQFOYwwWcXu lSztHhm3vvhaggo/BGGXMfg+I4Hs9K7vxCbsr25SA+1O+9F3RnvHZVR/6zyYeO22rEzF nA9t78AN4MZPBsUkGeWZeuBf/4Ww+EmDJyxOC+a0Ni/dn14/gvUbxO60SgxhG0oOsS7D JeJw== 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:dkim-signature; bh=fJVkN3zl/CpWmP9dd2Lm5sbuLgWWweRXNMjf8rPwe/o=; b=bS9wKgF013Q1IZs7wP93G5FKBrmdugPCLwgAn1CAHkpKYt9n1az8LNw/sIM7ReJrhd 5zgIyjg/9EeAI2wn347IX4aZXEPqYImUA6kkZFi+BU+wC39pgLdsZ9omoIXCGVOfOI1/ Fg4Yydhwi21xoQGomAqtINzavcjxi75eMrkdqtcCMOnADtDsCe51gB5iKYjxTPjCvxyl R0XpwcGMr8xX2OxRI2VqALRjKlaO/R5G/UeczNDffH61oo9mwL6BGcwlO7e4Otav/SOj eIrO9SIAlj5ov8fo7UWpNXO6w9q4jFDRasS/KvGHgFEP04foP+s9fIus9cW39QjpN9+Y 6szQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=SU9FA91w; 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 p10-20020a170902e74a00b0016bf245fbe1si2736431plf.296.2022.09.23.01.07.16; Fri, 23 Sep 2022 01:07:27 -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; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=SU9FA91w; 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 S229963AbiIWHmy (ORCPT + 99 others); Fri, 23 Sep 2022 03:42:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbiIWHmw (ORCPT ); Fri, 23 Sep 2022 03:42:52 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B94BD12B5E8; Fri, 23 Sep 2022 00:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fJVkN3zl/CpWmP9dd2Lm5sbuLgWWweRXNMjf8rPwe/o=; b=SU9FA91wpTS50POPo2Bs9dgx7k sgMOA/lj8s09GfcCjfXrtEGlVzZivBrNX5QoqVYQHJbkB8xaDWABSlHJ4y4Jn1Q22rc5DNStYHYGs 51/6Q8YLcRpxiK7XdQaRTSzAFy1gkkLXAa592KdQyUBiGSUcXry1DypZmhfi5amggg1HSQnkZJvNL OfVum3geX4LdQk2ukKdS3wvPnWXPSEA+u5ePg/2L1vHABkx/yvwmzHQbD9lXQEQvi9fMpYTyDnLUq 6i0+fCKkH+qA+31iLJPZSqPpxNGRr6ojuGavOQSchM/LInAE8533HCYQbSPL2uKChV7HV+XyBnspa w5t8EePg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1obdK4-00FAHm-Ju; Fri, 23 Sep 2022 07:42:09 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id AD62F300074; Fri, 23 Sep 2022 09:42:06 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8B8992BB8937C; Fri, 23 Sep 2022 09:42:06 +0200 (CEST) Date: Fri, 23 Sep 2022 09:42:06 +0200 From: Peter Zijlstra To: Dave Hansen Cc: Andreas Mohr , 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, puwen@hygon.cn, mario.limonciello@amd.com, 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> <4d61b9c0-ee00-c5f6-bef1-622b80c79714@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4d61b9c0-ee00-c5f6-bef1-622b80c79714@intel.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham 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 On Thu, Sep 22, 2022 at 02:21:31PM -0700, Dave Hansen wrote: > On 9/22/22 13:10, Andreas Mohr wrote: > > (- but then what about other more modern chipsets?) > > > > --> we need to achieve (hopefully sufficiently precisely) a solution which > > takes into account Zen3 STPCLK# improvements while > > preserving "accepted" behaviour/requirements on *all* STPCLK#-hampered chipsets > > ("STPCLK# I/O wait is default/traditional handling"?). > > Ideally, sure. But, we're talking about theoretically regressing the > idle behavior of some indeterminate set of old systems, the majority of > which are sitting in a puddle of capacitor goo at the bottom of a > landfill right now. This is far from an ideal situation. > > FWIW, I'd much rather do something like > > if ((boot_cpu_data.x86_vendor == X86_VENDOR_AMD) && > (boot_cpu_data.x86_model >= 0xF)) > return; > > inl(slow_whatever); > > than a Zen check. AMD has, as far as I know, been a lot more sequential > and sane about model numbers than Intel, and there are some AMD model > number range checks in the codebase today. > > A check like this would also be _relatively_ future-proof in the case > that X86_FEATURE_ZEN stops getting set on future AMD CPUs. That's a lot > more likely than AMD going and reusing a <0xF model. Except you need to add VENDOR_HYGON at the very least. All of this turns into a trainwreck real quick.