Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15798681rwd; Mon, 26 Jun 2023 01:13:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4qc6+GTb9t26JkoeoTt+w6Z9+5ItwKqsEjyDv1B3mZ7MCWeNUl1TanTUGHZiiDrB7Tpqbn X-Received: by 2002:a17:907:162a:b0:988:918c:8116 with SMTP id hb42-20020a170907162a00b00988918c8116mr19277981ejc.61.1687767216347; Mon, 26 Jun 2023 01:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687767216; cv=none; d=google.com; s=arc-20160816; b=jTrMTfcTknbwKA1EV5cJXkdjv8bQLk2OSik6hIeGIaeIPNuFpSv1nnU3bLs/PNlBjH duXsUF/sAK4c3Ijmr4q4KTCGLe7cAvlmcJudalZy7URpuPOasDQMr5FrYyX5dUHSlZ1X lrhFYm4Hcm8svBOEZ1uqAhKEhaSu0r6i8RBv8oQ44vkIbhG9yh7lbwzDTiPjXFe+O/9x kgrZjOadgHAvzU+80Ba5nBVqhaXRF4EGAF/vWjLsHgddd3O48FUT0e4YWdOztJ+QDA6e mBgjrMBcm2vJHysflY/KfAeMmm8L/V/lt5SRSfUPkCYITs1byp8YE5J8TfP39UsXieMp vPAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=9h//npFiRqU0mNfHbSBAVfJDwQ39vSNf52Cxaq+6OsY=; fh=yp4m9y04hVz8V5fOLkGRGNa49msKAFAucqjI79H21ic=; b=JjTV7dkaW1hhEEmTouSkTE9830/GitNnaflOeui/i7/gllpeYq/bFKeB8D+qLdC3hp 0slNbnXyV9rAmA7+ZqSz6QVVs0uxO1ugyYnkhpUywTAiNXpyI6tErHrid+VLvEEkwcey xUrKia3k2QQKJdETLrxlI6lz20ncyfFBIMI4FQt7iTdZDGstfJ/SCZiImnLj1Ss8lLrV /L7r0aeKkRDri9wMO6PilcjNMNdHa3BMtK8d8BGHgzBxUMWybLmuIv2QG0U0xCPH5OBi r4pJtxPnkJAVBWOjzyHlodLUuXF3TLJiFSIWzfmMJGLuCP478DV0GTO7bA6x54lw3hBv L9vQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lh22-20020a170906f8d600b0098897c46e08si2432746ejb.987.2023.06.26.01.13.12; Mon, 26 Jun 2023 01:13:36 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229628AbjFZHp2 (ORCPT + 99 others); Mon, 26 Jun 2023 03:45:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbjFZHp1 (ORCPT ); Mon, 26 Jun 2023 03:45:27 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F097B8F; Mon, 26 Jun 2023 00:45:25 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 68D002F4; Mon, 26 Jun 2023 00:46:09 -0700 (PDT) Received: from [10.57.28.58] (unknown [10.57.28.58]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4A6823F73F; Mon, 26 Jun 2023 00:45:23 -0700 (PDT) Message-ID: <6faf93fe-f8ef-32ea-47ad-08531d630dd8@arm.com> Date: Mon, 26 Jun 2023 08:45:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH V4] thermal/core/power_allocator: reset thermal governor when trip point is changed Content-Language: en-US To: Di Shen Cc: "Rafael J. Wysocki" , daniel.lezcano@linaro.org, rui.zhang@intel.com, Di Shen , amitk@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com, jeson.gao@unisoc.com, zhanglyra@gmail.com, orsonzhai@gmail.com References: <6aad180f-410c-5b11-b30b-c7bc02cbe054@linaro.org> <20230619063534.12831-1-di.shen@unisoc.com> <62c35d1c-7dcd-7bf2-253e-65cdfd6e92cc@arm.com> <2884a54e-4db0-bf47-3b8a-0deb337208d8@arm.com> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org On 6/25/23 09:39, Di Shen wrote: > On Fri, Jun 23, 2023 at 4:10 PM Lukasz Luba wrote: >> >> >> >> On 6/22/23 19:27, Rafael J. Wysocki wrote: [snip] >>> >>> So there seems to be a claim that IPA is the only governor needing the >>> ->reset() callback, but I have not seen any solid analysis confirming >>> that. It very well may be the case, but then the changelog should >>> clearly explain why this is the case IMO. >> >> I agree, the patch header doesn't explain that properly. Here is the >> explanation for this Intelligent Power Allocator (IPA): >> >> The IPA controls temperature using PID mechanism. It's a closed >> feedback loop. That algorithm can 'learn' from the 'observed' >> in the past reaction for it's control decisions and accumulates that >> information in the part called 'error integral'. Those accumulated >> 'error' gaps are the differences between the set target value and the >> actually achieved value. In our case the target value is the target >> temperature which is coming from the trip point. That part is then used >> with the 'I' (of PID) component, so we can compensate for those >> 'learned' mistakes. >> Now, when you change the target temperature value - all your previous >> learned errors won't help you. That's why Intelligent Power Allocator >> should reset previously accumulated history. >> > > Yes, THAT's the point! > Maybe I need to write the commit message in more detail. > Yes, please extend that description. Regards, Lukasz