Message ID | 2678096.mvXUDI8C0e@kreacher |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp463003wrt; Fri, 17 Mar 2023 10:19:54 -0700 (PDT) X-Google-Smtp-Source: AK7set9YAK/s6siBAdt9dTnU4naul7xq7WqbJL5gXSKhv0ijcCQ5IVtQzlUV+0625SGjweHIMLwP X-Received: by 2002:a05:6a00:e0e:b0:626:62f:38d8 with SMTP id bq14-20020a056a000e0e00b00626062f38d8mr5600274pfb.3.1679073594634; Fri, 17 Mar 2023 10:19:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679073594; cv=none; d=google.com; s=arc-20160816; b=ABUNGrjnC5FiW9AnYtbqWqlRdTh4nhW/aS8NO4ds73FW2wK8VhuOMsPvQiKQae4vbY xFP7VcwxJbvPF8ugsfXmwa9k+yiw6L/ZVkypb1CRjrJ8lB2he8L5Xlm9dE6ZB4tiEiim Ixk/4zwepVX23GLPRob3vkiDlpkxng9ob0UE4da7P6DcNDvtxvBgywrpm91QiJ1pGD06 aqYGWMZiYVwY/fj5SZ1UnotDbBOgSMsZ4P8MTX1AQKFMoAzLo2ymD+k/K62Z5TALEXM5 4vpFKwdsmSiLESW4eUq3swaD0pr+4/Q/JmwFVDnSeHrYHtxbOR2j7t48SwJztYpPPT5O 6OzA== 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=6dkOIwgWx0uk4mL0J7n3+ZOs8MhacAKMgmVkCpQD+E0=; b=Cl9LYM68rcidim67k9wHOyGUx+h0WFH6/Y6HVRPpXPkCpUql3gV/XQR+Q/UaXvsYfx 39cwC0GeHqdQBw9JeKN6l3znmqJGjJrJerLssK3rd7xAEo69d7Tu8YAnVPV7ZGYTdMDw FfCf62eyXaXhCCLZp8aPbCLgqnj53Cn126sYPud805O54aWl2R51UQjwjELYN8GIQC6q 1/rYi/3qkigjTc07lyHmcIQpNqvwBffNtHFTRH6rh9pq4mSVi8yB9pQf6a9NlPypL57k tUUYJt+UgPKQuYGbpazf/kHOOAXXu8yNx5Xfr6bTQ/RIvawqoWIVy4D9D6LIcaf7MjGO AC2g== 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 187-20020a6205c4000000b005a9cb7d4781si2799574pff.258.2023.03.17.10.19.39; Fri, 17 Mar 2023 10:19:54 -0700 (PDT) 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 S230156AbjCQREb (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Fri, 17 Mar 2023 13:04:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbjCQRET (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 17 Mar 2023 13:04:19 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E946CF756; Fri, 17 Mar 2023 10:04:17 -0700 (PDT) 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 67b4c436527aeee2; Fri, 17 Mar 2023 18:04:16 +0100 Received: from kreacher.localnet (unknown [213.134.163.228]) (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 9819B1C52C22; Fri, 17 Mar 2023 18:04: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 v3 0/4] thermal: core/ACPI: Fix processor cooling device regression Date: Fri, 17 Mar 2023 17:48:04 +0100 Message-ID: <2678096.mvXUDI8C0e@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.163.228 X-CLIENT-HOSTNAME: 213.134.163.228 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvhedrvdefvddgleehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepgeffhfdujeelhfdtgeffkeetudfhtefhhfeiteethfekvefgvdfgfeeikeeigfehnecuffhomhgrihhnpehkvghrnhgvlhdrohhrghenucfkphepvddufedrudefgedrudeifedrvddvkeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduieefrddvvdekpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhnsggprhgtphhtthhopeekpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprhhuihdriihhrghnghesihhnthgvlhdrtghomhdprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghr rdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegurghnihgvlhdrlhgviigtrghnoheslhhinhgrrhhordhorhhgpdhrtghpthhtohepshhrihhnihhvrghsrdhprghnughruhhvrggurgeslhhinhhugidrihhnthgvlhdrtghomh 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?1760636273620976538?= X-GMAIL-MSGID: =?utf-8?q?1760636273620976538?= |
Series |
thermal: core/ACPI: Fix processor cooling device regression
|
|
Message
Rafael J. Wysocki
March 17, 2023, 4:48 p.m. UTC
Hi All, The two previous revisions of this patch series was posted as https://lore.kernel.org/linux-pm/2148907.irdbgypaU6@kreacher/ https://lore.kernel.org/linux-acpi/2692681.mvXUDI8C0e@kreacher/ 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. Thanks!