Received: by 2002:ab2:7903:0:b0:1fb:b500:807b with SMTP id a3csp1468690lqj; Tue, 4 Jun 2024 02:30:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPbIHtMBCAhip/LxeQDklExDIuqUsZlfu5Fx3eDZGMtnwURJQYaoQtKburMWMzLIBF67RALRQ+3NAvGg2kynAaw/7S7n3v3DvcQ/uoig== X-Google-Smtp-Source: AGHT+IEowOKk1WoG4kVsuWt8CSEiSuw9+xQwGhpNbFCgZM50Z70pPmUgVOne/FwrA+MBmJKT4cQh X-Received: by 2002:a05:6e02:152e:b0:374:92a4:78df with SMTP id e9e14a558f8ab-37492a47fdamr105833625ab.9.1717493432495; Tue, 04 Jun 2024 02:30:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717493432; cv=pass; d=google.com; s=arc-20160816; b=bHGaf1i6qni4irRgV3xrxjbu5fXywSBizFoRJVlCxh+vuzm/q94kAF/Lwmp7nilwKD qQ+pbKZP5xHeyQN4kcYs2U0fe8pUD8uaMRVhjXocnaVwQOMANEtWnySZ62j8CaZ+CQZM a8p9vIrZzjKxo5PAXveoTGnHFRA49LH83qLVyXV+H6jO3HKMeYqiHETrYHfwxdOFsEZX TdM8X8es6MTYuOifphEdc17DrAENBdXBzlBFEsesfcpNG52nQzRdo3JII8OZasR7Xs+S ssOKBET4FBSgFJH2pbsXs3JlJQWbrWppQcXN2Rx64NQXb2pMjX5TmSTDxLu0BmX3LUaQ THpQ== 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=A+ANIEaxDjFItbPQlfGt4TP2sj5r7WW6PokVQXrceXk=; fh=1zlAyoHwLWj2dpcUUjQOLNirz4V+cQkZURzC4Y8xDqA=; b=hUuMN9cOyK6NzVakdxBbcWZ4zJEmwWcO5P4ZMQ6wVGDhMQP7bossZhBjiJnxiXODoh rdrdFx06srKqqZ5PcnHtsGPtgYbLSYJfPkEhhHgeTHXrhmf2NoIcll2Serl0c9+WFS6j gRzj2/iMZ34Sd6U3Yjq9t0jrAeF1sc/R1VvS6i9mgwV/fVkOPDqoLOvxo9qIhAMXe6+U LIn2C6gdsysPWm+XHA3OQ+mZ/eON30Bf5eCe5/37pki2oBGp9TaZYHHZ5WHOt41a3jz5 mK+pF6HTe35KyCoA8FS8f5MRZtdYGXzuLuJCh7VplJTqSCfGyE+z9arBcSRRAIfKsou3 gPDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=YVlCYroB; 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-200350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200350-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c359e098f8si615699a12.337.2024.06.04.02.30.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 02:30:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=YVlCYroB; 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-200350-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200350-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CD334281A50 for ; Tue, 4 Jun 2024 09:30:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E2F33143862; Tue, 4 Jun 2024 09:30:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=xry111.site header.i=@xry111.site header.b="YVlCYroB" 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 8496A39FCE; Tue, 4 Jun 2024 09:30:23 +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=1717493425; cv=none; b=NFfZsWwyv/JULfEBNZzMRqNS8CTDjvlOhAhUkIoHOh78KLjGiuZCew19ydf+AGlgPb9nkDrlt4iFsOTv50nJTMo9PG1uPKRhgTRMLsotgvuVe3v4K4ZVqgZp7f0aOJwQb37+BfmiRZtvFeylrnBExGqiF8anWhQGuLQjy0Y9x9s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717493425; c=relaxed/simple; bh=Qx8MxPQX33Ba6WlaPwwBuVOgH9iS8300glRn1WMltPw=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=YvRiKYd2uESeqLQQJC24t5B4i5OfKpIMqd6XffiLDqR0QLegcJGpU5cwANqgwEy3Hm8WiJkS71fwuo/k78Fy3yesuLuL3Dce4JnIwQtGG2s9MC53PdcFg8Rl/ZY/qs9aJ/NXJjTTNFIv+mv4UBKg0DbBOhM5tl1xXk+/OwOfqKs= 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=YVlCYroB; 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=1717493422; bh=Qx8MxPQX33Ba6WlaPwwBuVOgH9iS8300glRn1WMltPw=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=YVlCYroBwZuRnfatZYJS6r/4aJV7BS8s5+fSUxuM1BqvZLCOS7TDPC6nIodJ98+s2 8WhJNTVJ+ZjkLdgIS/96fX15yoVfiZgiGrPl65fqro2bdcAmcVNO2eXTmzG8uCpdL3 Zz1kL1bMMOl5b2ZbmyUyjwaE6rWNF6JPI7V8NIfc= Received: from [192.168.124.13] (unknown [113.200.174.23]) (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 7684E67200; Tue, 4 Jun 2024 05:30:20 -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: srinivas pandruvada , "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM , LKML Date: Tue, 04 Jun 2024 17:30:16 +0800 In-Reply-To: <1da736da33a61de92314934ecf7fa0420d6d6b81.camel@linux.intel.com> 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> 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-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.=20 > > > However, > > > that would require some code surgery. > > > Something like the attached which does same way as user space no_turbo > update. > =C2=A0static int intel_pstate_register_driver(struct cpufreq_driver *driv= er) > =C2=A0{ > =C2=A0 int ret; > @@ -3114,6 +3137,9 @@ static int intel_pstate_register_driver(struct cpuf= req_driver *driver) > =C2=A0 global.turbo_disabled =3D turbo_is_disabled(); > =C2=A0 global.no_turbo =3D global.turbo_disabled; > =C2=A0 > + 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. --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University