Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp253911lqb; Tue, 4 Jun 2024 10:16:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU05jZ6Vcd+x6z7nEUzU+elQYB0l9/4DBMtZeN+WfP08YCJvkz4J4KwLWefBRhnlwTH8cYQ5QvCG0KxDRZq71LLmgqyAro6M/gFxq7A9w== X-Google-Smtp-Source: AGHT+IEnzaf9bbcPWQxL6mViu9uzsw4Y/NxlnMacgyU64KMTuyGqGjD0wAT3vc18F9PWRuIYuXkZ X-Received: by 2002:a17:902:e885:b0:1f1:8fd9:b99d with SMTP id d9443c01a7336-1f69390b667mr50167455ad.23.1717521375612; Tue, 04 Jun 2024 10:16:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717521375; cv=pass; d=google.com; s=arc-20160816; b=iSzEtZ2w76jllh3GrbVMc4ZOQNBKWZIt+uWA3ZSk9tL8A7N+3R+TIF7VA3n0h4qpQz yR9UFHqH++a0SIMJNFC8pmlKs+c1EMqWsRUGr1IwZd36x3hwOVCqrq2mGf2m2BUdmO8y K4IQAdblDhGfIE3q+Q8GQ2iHydkRCF6Kt67Br3AzTgNjMCeEi9szmx6tOHHq6uOsfhx8 A6/dxpkMoAmDGtSFRwc2EZQe/1c8PxuEm8UmwmzXSENNn1mpPPeZL143sU5X3Te+RYiC IWceGDpNyuvVab+PBVsBg/AO1VgUBEt59HHnh9Kax4ukYp+rdkqCXxiUpQoF7ek6Y2DV R26Q== 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=3nh+1EDnAXp2E3PGA9wZMX/ESxAcGK6TQbWb8hZyRSM=; fh=waMByUIWjCC6Boaa5xXdJvviEQPDruSZBnYty9VnXbg=; b=JGFCmE37ZgWHraIzZzsJLUWTeXJn5dm+Bow8TXJRPTojH1cQ1NtQYhJBhQH5bmiYqT SPqe7r5tk+vGbJSXc3OxVf9wwr+nZHLqnsURjMX+WWFWwOTWHcragonRHDZ6SwX6iXb+ casqBEE23CYwL3mPflFUqO1NvCDvFRzb+yJtDSbrfE7TBq9iuWjB1hva9eKfWiPihKN9 5CYO6zHxVrTBYcqlc8LXtxEF/BKkePr/YiylUnykgAUnzUl0nUMvKWQQ/uXuS4CsArWd Ukoe6fLZtYfh0oMI7UlLi2Bay488bYJpZJn+XHMs316UuahNOyJru9aNftzjNeIczcVx +mjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VublYuka; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201099-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201099-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. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f63233ef2fsi85491955ad.104.2024.06.04.10.16.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 10:16:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-201099-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=@kernel.org header.s=k20201202 header.b=VublYuka; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-201099-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-201099-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 56E90B27E94 for ; Tue, 4 Jun 2024 16:47:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 866FB1494C3; Tue, 4 Jun 2024 16:47:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VublYuka" 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 98FF813D607; Tue, 4 Jun 2024 16:47:06 +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=1717519626; cv=none; b=eEJIXn3luBrCdvDsaziYmf0Dr+O2jBe0WDsVxt5minUwI2ZjQkLCk5pEsa2H6qin9kRiEmE2FoYk30cC6dseu+h42beUHMVIX6E371qxjTfIyOXd7SZOnxDV42viU9HB+wmMv/7BCEV+TmXdqtMoaDfqTjic6Cjm1hndLMRq2N0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717519626; c=relaxed/simple; bh=NaQPL/mB5WOAFakIMpjp+LfKzjoD3bgZCruovf/5aIM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=HlHtPQy+xy3vXqtntpYK/EUJkumLbKl0yyuHCQi/k1b60cqKDp0oeO1ATN24/a6Ps3VDdj31+BXHXL47cYjHOhhshcFSV7bMXEArzLTXqTnZPHbT10tpoZEd2pkYE+r1WrwK0s7mnxXDylGP0b4naE7MM7QUZ/v0y6u5QPj5X0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VublYuka; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 20364C4AF0D; Tue, 4 Jun 2024 16:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717519626; bh=NaQPL/mB5WOAFakIMpjp+LfKzjoD3bgZCruovf/5aIM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=VublYukalkFdLt7uNJTqbYX2nA8pMe4HhFmgp7LSKBTA43Tu2EvgBc7Ikzc6GpmOa +NZXnu8mcHxBy3nRb7/ZpXKPU2TngmbvO8BGQr74eipICqZelmvFqeu/Ta+klFIf+X fHdbc38tmyltHQ0fc/wysNlZ15u6v3iQrPLoE69Q4cTKjU8YomvljaseE0vgiC2Obk CW8VHP1n4qKcOOOVFu5WiFEmAa66jlMcX5Ioyi7JXrr+6RTXgkhgDL6ykBcvZFgkqf e2ACCq8eGDOSKTHGu9QftzvcD7xYevf1zn8tcz+DP+SR/fOU6D+//nPci4clElpXol RRns+uspxVf9g== Received: by mail-oo1-f47.google.com with SMTP id 006d021491bc7-5b99ba97d89so499505eaf.1; Tue, 04 Jun 2024 09:47:06 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCU5EXmA1DHAnbK0mCvBd8WsFjRFen//la2zCUCZBqGQ4DYaCiHAB5/VusHBz+ZsUX+Z5S0beFOZGRWcg/947h70Iv9nJNoLU8765ej9OM2Ec3o2rc/VshBgmGofv51MoQH1VmvTWLM= X-Gm-Message-State: AOJu0YySd7+FETE9EFvohfGoBXvPyTgWhYbVbClfLv98JR69rLjkCiPE OND8DBOy0J2HHCdy1RymSgoOiwbwYTGvSstYCvKWdwZ0d+DVcIE0B8HN4zx+xF5CLkIajFFPH9b IaSCLBJPiQFP6q5pT+GeWWKAlpi8= X-Received: by 2002:a4a:ea38:0:b0:5b2:f29:93f0 with SMTP id 006d021491bc7-5ba78d42df7mr222079eaf.0.1717519625410; Tue, 04 Jun 2024 09:47:05 -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> <1da736da33a61de92314934ecf7fa0420d6d6b81.camel@linux.intel.com> <63e98f2151ef64de92cf7e3da796937755ea5552.camel@linux.intel.com> <258ce61c155c28937620f6abe57a39f2b4b0ff56.camel@xry111.site> <101b903e58f2ebae60934edc374c7cda09f83de1.camel@linux.intel.com> In-Reply-To: <101b903e58f2ebae60934edc374c7cda09f83de1.camel@linux.intel.com> From: "Rafael J. Wysocki" Date: Tue, 4 Jun 2024 18:46:53 +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: srinivas pandruvada Cc: Xi Ruoyao , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux PM , LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jun 4, 2024 at 6:41=E2=80=AFPM srinivas pandruvada wrote: > > On Tue, 2024-06-04 at 18:32 +0800, Xi Ruoyao wrote: > > On Tue, 2024-06-04 at 03:29 -0700, srinivas pandruvada wrote: > > > On Tue, 2024-06-04 at 17:30 +0800, Xi Ruoyao wrote: > > > > On Mon, 2024-06-03 at 21:31 -0700, srinivas pandruvada wrote: > > > > > > > > > > > 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. > > > > > > > > > > > Something like the attached which does same way as user space > > > > > no_turbo > > > > > update. > > > > > > > > > static int intel_pstate_register_driver(struct cpufreq_driver > > > > > *driver) > > > > > { > > > > > int ret; > > > > > @@ -3114,6 +3137,9 @@ static int > > > > > intel_pstate_register_driver(struct cpufreq_driver *driver) > > > > > global.turbo_disabled =3D turbo_is_disabled(); > > > > > global.no_turbo =3D global.turbo_disabled; > > > > > > > > > > + if (global.turbo_disabled) > > > > > + schedule_delayed_work(&turbo_work, HZ); > > > > > + > > > > > > > > I have to change it to 20 * HZ to make it work for me. 15 * HZ > > > > does > > > > not > > > > work. > > > > > > Is there any consistency or it is changing every time? > > > > It seems consistent. > With such a delay, I am not sure how this even worked before. > Can you revert the patch in question and use kernel dynamic debug > dyndbg=3D"file intel_pstate.c +p" kernel command line and collect log for > 30 seconds? I think that it worked because the MSR was read every time intel_pstate ran, so it got updated at one point and stayed that way.