Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1149026lqj; Mon, 3 Jun 2024 11:34:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmXFayIxSJ7V91UosfXfzE91ohPj5aS2L0JRVBkwPqkw0euhqIpRqTCQEz1kbzKDy5UJ3Hil0cU1htumZTcSDfqgt6NwGQoDoNN7Wzpw== X-Google-Smtp-Source: AGHT+IF1SQxPs5oqqDXJIda0+amZHJdBvhBN7lPwlZju5OxgkNecEjbJ2RSlN2r+xKhUU+izeDv7 X-Received: by 2002:a05:6870:d29e:b0:24f:f282:241b with SMTP id 586e51a60fabf-2508b9efc85mr10196468fac.33.1717439687849; Mon, 03 Jun 2024 11:34:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717439687; cv=pass; d=google.com; s=arc-20160816; b=xhpY0ZeR/9stv1PL2PP6HQy00QqeXI815hoqZJkZdH0AlFGogvTOx65AON4GZhJ9Uq ppFd/wLi8SohQlD8/ep2z1Gk/tKdVK8abKH5p5TyXrwvjueGIeK+j7Xl2b2+UqYjAbBd xF9JyX8epWy/m8d4Gcuc/RRSKHNBaF1115ctEITpyRkTBMAiO61n/4DT7gyHOma4gvc8 HAZYhWAF2m26AZIdeA8+BezPayLwjdw/ZQeKFuBloGXpg9IDbHT5aYeruYUiceM7jaTu uIxx6dU3PhzqO3r9fDbgNWD+HM/oJD/10vCfX1PZRZldUtNbhNuPAWVOBqexIrjkOlF9 MxWA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=v2DrY2/xQybT1KTCqc5RCYbWmvZyrrlb/papGy+paOg=; fh=uBBfshlhUNLn+OB718IxX/Z9hjVgoQobtJK210ggPBU=; b=GUtrCrCAWdjVUdrJNS84yqKPJa9wNM/TFrZrRF5WTcoUJDWlgk510pzGPdZSZfJ5RQ qW85BDD/mAOKLf5asaiJGxvFG9myMmggNWEScXDkvrIpZSR8fOES2BUggMwehPZPVOyy EO2GAkbinbOiEX6+IowLYnQGi859Ecw7Q+zJnJPZratGpagRHu3ReC7MaarU5AmVuYTd dzYeT5loKSTU1PdqTQrBaODP8R+yXyq+xwM1mLnRUMxvklwJoN+w9btV8yY4nxo+vlNu KUPdXBDf6Uh+dHN8awryeK+ngsas9lyQbX/IqeFpPIwiI3SlXPiQ/54gU8gAwqsYGRdp IK8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NsEnbYk8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35d972cb5si6831336a12.885.2024.06.03.11.34.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Jun 2024 11:34:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-199568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NsEnbYk8; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-199568-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-199568-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id AC9DCB23B39 for ; Mon, 3 Jun 2024 18:32:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B56C31386D9; Mon, 3 Jun 2024 18:32:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NsEnbYk8" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8CAD1CD38; Mon, 3 Jun 2024 18:32:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717439564; cv=none; b=RyVJjdKUsdn1x2mSW22shsGPxUwdpbrqm9hSFIAvbfWV2ZslRwmuUey2vquLaHRt3cdLuMvamohu3QHnUwjQkTx6QwzQv+wWoON4vBGvo9Fn+wlcMb5DdUTNEGL18fF1wYxDpfyPW5GOAkSD9NnK6a9HbGz7fdsHzTxsIM3uOIg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717439564; c=relaxed/simple; bh=aPa+/FsLkyYUDC9JB9iMOLBgMjAYvMKPSrF8ZW8Ds9s=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Bu/5Q9fwkR/YzImnxk2/xEiNQE0yGtapDgTwfBVWi1tDzFNNWnBKzDooeVBGL+kHSy8tsRqg5yq5oMCQkCP867otG08GpBH4pG0PpoNEJEMgzJt5S+O7/OSLz+NFw/xK+t6I/ArpJ1bKt9ch8Qym96ZvEXbPHp0oE+VWQbNRXCE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NsEnbYk8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 715BDC4AF08; Mon, 3 Jun 2024 18:32:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717439564; bh=aPa+/FsLkyYUDC9JB9iMOLBgMjAYvMKPSrF8ZW8Ds9s=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=NsEnbYk8tcs5EN293qSPbTGJ7Ffzf1hp1D7/KGgH4flOKv+9yRsQu2d9DHUzSSiQF ywfJJl3Ow1AeWqRM90arYV9XdE6o5psPLn7DQYa0gmR8k1cVT2QTYcqtCILRJ+mbH7 sBdBpg3ei8jcXkjE7DKC8Sn5G0fFq7OGchun3zOYHTPr299vlPKjN3oq5xiyHsdDlK pQeoDFKnuAIUTnKeXfzPGxS6Ecy63OAdXWouQnCwbkrhBDxrF08vvmNIfRVL42/YkD KnLrduogY6PLPFn5cA12Prw2AjnQXvlmer1NQjGTCxs3xo90h484M7BXsIRRNE+Zen iHpE1zzj1S4+g== Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-5b99ba97d89so443190eaf.1; Mon, 03 Jun 2024 11:32:44 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCXAcxeO/oyX541bnnlLJVsA5qHdWFzpCTlOicgC5w97BXM5D40GCAAJg08JzsZKV4mySBUvOXvKoEtgyk0YYdP6HgP/dTFpmXjJRvlNzPzUXpO0WxVSYYB1SzidQdxbQOvFMWStmxg= X-Gm-Message-State: AOJu0Yyi+PNnz0lZYzL3fzQgjsA3Kg6866f+IcczbUlgWJ5O7KQtnGE+ lBt4wTDR4z2gij2sRopQkGzyM9rtJQ15BAHUuNOpTjFyyBcciFkem9nWEdluSwAnhrYAFs/muGh 9Ty83bjEI52uQlWr0cwih0xC2OLE= X-Received: by 2002:a05:6870:36d5:b0:24f:ee85:2c9e with SMTP id 586e51a60fabf-2508bde6735mr11670759fac.5.1717439563751; Mon, 03 Jun 2024 11:32:43 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <13494237.uLZWGnKmhe@kreacher> <8366982.T7Z3S40VBb@kreacher> <6d5ee74605bd9574baa5ed111cb54e959414437a.camel@linux.intel.com> <6ebadacd8aaa307a5766cdb1b4d4a5c69acd87ac.camel@xry111.site> <30a30c5107a47a2cc3fd39306728f70dd649d7fe.camel@linux.intel.com> <29d69252dcdc398f147c9139a8666d09e7bd831d.camel@linux.intel.com> <0324bc3a88654855719cd48a5ed69a34eea31037.camel@xry111.site> <48eba83030e155f703b4248e9c1ae65aa44b1a83.camel@xry111.site> In-Reply-To: <48eba83030e155f703b4248e9c1ae65aa44b1a83.camel@xry111.site> From: "Rafael J. Wysocki" Date: Mon, 3 Jun 2024 20:32:32 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 2/6] cpufreq: intel_pstate: Do not update global.turbo_disabled after initialization To: Xi Ruoyao Cc: srinivas pandruvada , "Rafael J. Wysocki" , Linux PM , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Jun 3, 2024 at 7:44=E2=80=AFPM Xi Ruoyao wrote= : > > On Mon, 2024-06-03 at 10:11 -0700, srinivas pandruvada wrote: > > On Mon, 2024-06-03 at 21:12 +0800, Xi Ruoyao wrote: > > > On Sun, 2024-06-02 at 16:11 -0700, srinivas pandruvada wrote: > > > > > > /* snip */ > > > > > > > What is the output of: > > > > grep . /sys/devices/system/cpu/intel_pstate/* > > > > > > > > Also > > > > rdmsr 0x771 > > > > rdmsr 0x774 > > > > > > > > > > > > Try these three patches. Don't worry about the commit description > > > > for > > > > this issue. > > > > > > Unfortunately they still do not fix the issue for me. > > > > > > The outputs of grep and rdmsr commands are initially: > > > > > > /sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost:0 > > > /sys/devices/system/cpu/intel_pstate/max_perf_pct:100 > > > /sys/devices/system/cpu/intel_pstate/min_perf_pct:9 > > > /sys/devices/system/cpu/intel_pstate/no_turbo:1 > > > /sys/devices/system/cpu/intel_pstate/num_pstates:41 > > > /sys/devices/system/cpu/intel_pstate/status:active > > > /sys/devices/system/cpu/intel_pstate/turbo_pct:33 > > > rdmsr 0x771: 10d1f2c > > > rdmsr 0x774: 1f04 > > > > > > But it then changes to: > > > > > > /sys/devices/system/cpu/intel_pstate/hwp_dynamic_boost:0 > > > /sys/devices/system/cpu/intel_pstate/max_perf_pct:100 > > > /sys/devices/system/cpu/intel_pstate/min_perf_pct:9 > > > /sys/devices/system/cpu/intel_pstate/no_turbo:1 > > > /sys/devices/system/cpu/intel_pstate/num_pstates:41 > > > /sys/devices/system/cpu/intel_pstate/status:active > > > /sys/devices/system/cpu/intel_pstate/turbo_pct:33 > > > rdmsr 0x771: 10c1f2c > > > rdmsr 0x774: 1f04 > > > > > > It seems only the output of rdmsr 0x771 has changed. And if I read > > > the > > > SDM correctly it's a "Most_Efficient_Performance" change. > > That is fine. > > > > We don't have any notifications either via ACPI or via HWP interrupt. > > I think it was working by chance before this change as by the cpufreq > > core is trying to set policy, the turbo is enabled by the firmware. > > > > What is this laptop make and model? > > It's a Hasee X5-2021S5H. > > Hasee is known for producing some laptops very cheap but often having > "minor" issues. So I guess the firmware is doing some stupid thing. > > But turbo works just fine on Windows 11 so it'd be better if we could > make it work for Linux too. In principle, there are two things that can be done about this. First, MSR_IA32_MISC_ENABLE_TURBO_DISABLE on this system can be ignored altogether, but that would require adding a quirk. Second, a delayed work can be added to check the MSR long enough after initialization and update global.turbo_disabled if it is 1. However, that would require some code surgery.