Message ID | 2148907.irdbgypaU6@kreacher |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp590358wrd; Fri, 3 Mar 2023 11:31:41 -0800 (PST) X-Google-Smtp-Source: AK7set/9ynVm+8soJYkxmnrMEwp5ku9nr9o8ljTvsXoZ/gEyo7eYH2WVOK88Ub74Cmw5QDBymKIM X-Received: by 2002:a17:90a:6485:b0:237:461c:b44d with SMTP id h5-20020a17090a648500b00237461cb44dmr2748578pjj.46.1677871900671; Fri, 03 Mar 2023 11:31:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677871900; cv=none; d=google.com; s=arc-20160816; b=LdSLUNzeuG/w7VUqIavigcBwkfiD3mQoYCRcWrLtSvsGspQO+21JWb/pcGHFWJcyYz YcEF0eGPkS3hbYZ0Rt4k9FwAybpEocHacmdD+ndhJ5PbgT67OvjveuPb5NRyltyABFoq O12WN6N92WiFBl5cjEn1a0SWMkaub7fw41xriHX/CQEkxvNmw1uSXpa5P+tgVLVe2x6g 1ABhL37iu1/ZIgiVVmkDLtpeFj4E6FZJN2dPoJhyOqSLXunX6jRjaw5lj+qfP/GvEh7u SuUJR3QLkAGghzKf2erAg/vH8sTLoCZ11CePrn9GJH3GqUWKGFuMeOgPuSNU+w99i6l2 v5aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=cvr+FfdfTPc1j4Y0Dxq3pxWCt2aPyPzxVssvxp/MS9s=; b=O+jrp5nZlFxN79Dsq75gV1DOpNDq0XkDQStVDeZcJs9uKDwyQIgJLWw2ebfUHltTnm vx6M8izFRanXZa60CObZHSTiRU8Sz/6cjzWqpBy280t51ZWPcnw+Kx1KH57j9fWW+CWq 7lxd/UbynDB64v4kEr8fjxGwNRQuMPAu3nBHtUEs4BNQ7smxTXwx01hHeQMfwFRJZC1P nsraVFSVmVvFVk87eHhHVHxdd7e5ek8RzcN07ZWWBXlrkz1ENhXPL7981BjJgvTv1QgZ 0OSAwIu9S6O2Fth6K/hNdxaCrsNi1Q3JTzHWgjnai9KbT7ipKM0Cn+fj+YWHdSmEQb4d YA1g== ARC-Authentication-Results: i=1; mx.google.com; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j72-20020a638b4b000000b004fbbf27c7a4si2696627pge.836.2023.03.03.11.31.27; Fri, 03 Mar 2023 11:31:40 -0800 (PST) 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; 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 S231588AbjCCTYf (ORCPT <rfc822;davidbtadokoro@gmail.com> + 99 others); Fri, 3 Mar 2023 14:24:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231599AbjCCTYU (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 3 Mar 2023 14:24:20 -0500 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 06B62125BA; Fri, 3 Mar 2023 11:24:17 -0800 (PST) Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 5.1.0) id c9c6336197d2ec2a; Fri, 3 Mar 2023 20:24:16 +0100 Received: from kreacher.localnet (unknown [213.134.183.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 35F8F20619DE; Fri, 3 Mar 2023 20:24:15 +0100 (CET) From: "Rafael J. Wysocki" <rjw@rjwysocki.net> To: Linux PM <linux-pm@vger.kernel.org> Cc: Zhang Rui <rui.zhang@intel.com>, Linux ACPI <linux-acpi@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>, Daniel Lezcano <daniel.lezcano@linaro.org>, Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>, Viresh Kumar <viresh.kumar@linaro.org>, Quanxian Wang <quanxian.wang@intel.com> Subject: [PATCH v1 0/4] thermal: core/ACPI: Fix processor cooling device regression Date: Fri, 03 Mar 2023 20:18:30 +0100 Message-ID: <2148907.irdbgypaU6@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.183.41 X-CLIENT-HOSTNAME: 213.134.183.41 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrudelledguddukecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvvefufffkggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeegfffhudejlefhtdegffekteduhfethffhieettefhkeevgfdvgfefieekiefgheenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecukfhppedvudefrddufeegrddukeefrdegudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeefrdeguddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepkedprhgtphhtthhopehlihhnuhigqdhpmhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehruhhirdiihhgrnhhgsehinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdr khgvrhhnvghlrdhorhhgpdhrtghpthhtohepuggrnhhivghlrdhlvgiitggrnhhosehlihhnrghrohdrohhrghdprhgtphhtthhopehsrhhinhhivhgrshdrphgrnhgurhhuvhgruggrsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=8 Fuz1=8 Fuz2=8 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759376205983454554?= X-GMAIL-MSGID: =?utf-8?q?1759376205983454554?= |
Series |
thermal: core/ACPI: Fix processor cooling device regression
|
|
Message
Rafael J. Wysocki
March 3, 2023, 7:18 p.m. UTC
Hi All, As reported by Rui in this thread: Link: https://lore.kernel.org/linux-pm/53ec1f06f61c984100868926f282647e57ecfb2d.camel@intel.com/ some recent changes in the thermal core cause the CPU cooling devices registered by the ACPI processor driver to become unusable in some cases and somewhat crippled in general. The problem is that the ACPI processor driver changes its ->get_max_state() callback return value depending on whether or not cpufreq is available and there is a cpufreq policy for a given CPU. However, the thermal core has always assumed that the return value of that callback will not change, which in fact is relied on by the cooling device statistics code. In particular, when the ->get_max_state() grows, the memory buffer allocated for storing the statistics will be too small and corruption may ensue as a result. For this reason, the issue needs to be addressed in the ACPI processor driver and not in the thermal core, but the core needs to help somewhat too. Namely, it needs to provide a helper allowing an interested driver to update the max_state value for an already registered cooling device in certain situations which will also cause the statistics to be rebuilt. This series implements the above and for details please refer to the individual patch chagelogs. Please also note that it has only been lightly tested, so more testing and of course review of it is welcome. Thanks!