Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp280868lqj; Sat, 1 Jun 2024 20:22:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVaJrUvhTtNc7DK7ghufdF1gtvv24jKH7UaULuftkGWyXJwoNrE2RHQ4ZwAo3OdMCmueWAOsNyFi02ykLUkN9YVURpqNuMv+4grAFAwfQ== X-Google-Smtp-Source: AGHT+IEzUjozjhUqJUX3ErBLiPdL9oOLIfkBo1HmN0x+9ijc4oVyjE1rJB1JJuBhgvGZF2YyIWIO X-Received: by 2002:a05:6808:696:b0:3c9:8aeb:a83e with SMTP id 5614622812f47-3d1e361ddbfmr5619000b6e.52.1717298546494; Sat, 01 Jun 2024 20:22:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717298546; cv=pass; d=google.com; s=arc-20160816; b=YWM4SBOl9+oqt21sMFVfqYE5UEjeG8G6xpsMRQ5UP8k7kaDNohF1d442Kmtfwu3o22 uEbpYCBfLXcg1bmXSO1TkBeAakELAyl7MVIQaOJ9JYT4wpE9edqgRfnCg1Xq0c1mML84 B7EFU8loSv/OX8ECPt6Pz6KIHSiazsRBnFD6mNG7Ad8jmZadIiXXBDmQFEhydDGRTNhr 8H+zt0ObzlwY8OimsYmdDWcWav5CpkrwxTBlvjSVBW8XBwr+N9M0L+WRfdzC1Uyba92E RpidORYiCJChy41rZUQ828dCYQXZivCYaxi0V1IDwPNB5/gyrqDzVH9yq2iY+C77wYDK NEyw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=GsjTcDH/XDqc2lxvVOZ63JU8MYMDPuBlXN8Loc4KfUI=; fh=Zpv+NF4BctfSssVBgnGu1dx6kyF3bRcE3jDBvfPg1q4=; b=Y73YaUbJyBB772RVzixL70w7yYoqlWpOIyhYC0W5C0qYPsjEH3UwJaJy5/tJWhvydV mUTjnxb9Q47izwoClhoEx4UEDWKF6R8EV8ZHL4KQMRsqRaNKrS5ttp7MZo7rDNAwCx+V aryAJPoNO5ywRhqruSMY78e+3vtpnmtPmv0ZIMKL6R1z/nGGBXmUjoMBO/58Eg4CCK2q 2K1B4bb4HbggSZfJQLR0ykQ2AkuEzMJni38B/01WSMTfDfCBPtILmAuKg/NZpH6OP7WL eMc8xDaoJYvEu6/wTXTGPHN+O/sLbMk+E6veb6CspKqLCIN8aYmed8CkILXVl5Hlo2g7 WP5g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=DGYQFQwh; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-198080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c359e09f25si4187211a12.420.2024.06.01.20.22.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 01 Jun 2024 20:22:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-198080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=DGYQFQwh; arc=pass (i=1 spf=pass spfdomain=xry111.site dkim=pass dkdomain=xry111.site dmarc=pass fromdomain=xry111.site); spf=pass (google.com: domain of linux-kernel+bounces-198080-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-198080-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site 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 9153AB2121C for ; Sun, 2 Jun 2024 03:22:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC17FA930; Sun, 2 Jun 2024 03:22:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="DGYQFQwh" Received: from xry111.site (xry111.site [89.208.246.23]) (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 6DAFB79C2; Sun, 2 Jun 2024 03:22:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=89.208.246.23 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717298531; cv=none; b=gSoFeZw9hphr2G/2bY68PU8qNhJV0K61//2IXay6y2QqmK6AmmHbqN4IqY/HWDK/E2psD+OYu6lw2ltMcnpuofj22U1mY5QRMmSMtLA2qDjxADB9QNQOQZrMYb1LjsRA+q8NOuaMaaoBJ8U2KbZn87O0YUt5nEUx7Co1q+EYPHc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717298531; c=relaxed/simple; bh=ZT4I4nTMNjP+16wPoejISiX4teMein0dpUSm1Zq1j4M=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=tKC1U5QnsRqYR6ZKOlXhLZs8R3MQbdyje4/cqowYBMc5vGlbihAkqBPkIYrUN1y+BmIDq3eMURxar6MgdDHomKpBURJ9BpiVls0KkehYqwpkIHOyQTpvcf6l6TlckX8omIgQmXaGLfFMzwc2GbKFcBY9bvpj17YS1tFhnLHoyt4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site; spf=pass smtp.mailfrom=xry111.site; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b=DGYQFQwh; arc=none smtp.client-ip=89.208.246.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1717298522; bh=ZT4I4nTMNjP+16wPoejISiX4teMein0dpUSm1Zq1j4M=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=DGYQFQwhdWFJkqK6QXKRA7qVl7tR+o4rln86Hj8riI4rd2f0eOXf9PgtxtRinV07p Vqmvzexd+dR/u4XeGT8/tRP3mSgQCMNPPRHnneFWk0tDToT7PTYEGpxhaZrA9NP0DX DJ7uhoRB7CJ5d5VSddXAEsRydzeVNaVQHiC0DCjk= Received: from [IPv6:240e:358:11e7:eb00:dc73:854d:832e:3] (unknown [IPv6:240e:358:11e7:eb00:dc73:854d:832e:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 18E356732C; Sat, 1 Jun 2024 23:21:59 -0400 (EDT) Message-ID: Subject: Re: [PATCH v1 2/6] cpufreq: intel_pstate: Do not update global.turbo_disabled after initialization From: Xi Ruoyao To: "Rafael J. Wysocki" , Linux PM Cc: LKML , Srinivas Pandruvada Date: Sun, 02 Jun 2024 11:21:51 +0800 In-Reply-To: <8366982.T7Z3S40VBb@kreacher> References: <13494237.uLZWGnKmhe@kreacher> <8366982.T7Z3S40VBb@kreacher> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.2 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Mon, 2024-03-25 at 18:02 +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki >=20 > The global.turbo_disabled is updated quite often, especially in the > passive mode in which case it is updated every time the scheduler calls > into the driver.=C2=A0 However, this is generally not necessary and it ad= ds > MSR read overhead to scheduler code paths (and that particular MSR is > slow to read). >=20 > For this reason, make the driver read MSR_IA32_MISC_ENABLE_TURBO_DISABLE > just once at the cpufreq driver registration time and remove all of the > in-flight updates of global.turbo_disabled. Hi Rafael and Srinivas, Thanks for the clean up, but unfortunately on one of my laptops (based on i5-11300H) MSR_IA32_MISC_ENABLE_TURBO_DISABLE is mysteriously changing from 1 to 0 in about one minute after system boot. I've no idea why this is happening (firmware is doing some stupid thing?) I've noticed the issue before and "hacked it around" (https://bugzilla.kernel.org/show_bug.cgi?id=3D218702). But after this change I can no longer hack it around and the system is much slower. Is it possible to hack it around again? --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University