Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1115496rwi; Thu, 13 Oct 2022 09:13:45 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5UnksoTaUgQ/YA5eMr6Fvi4rgzhwQaObTFEv+H6hdurf5/SLTykFao1q9d0Q/bA7oNhiHc X-Received: by 2002:a17:90a:fa85:b0:20b:50ae:62b2 with SMTP id cu5-20020a17090afa8500b0020b50ae62b2mr606865pjb.3.1665677625558; Thu, 13 Oct 2022 09:13:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665677625; cv=none; d=google.com; s=arc-20160816; b=0rrOn4fawxTa0sj0p3aBItOJN5ga0FszyNcvcZwGDhyzWcWD24AhoPDc3mPvTdIHyO KeJoEe0X7RQdNUZXW2WPvf/JsttaXkArgc8gmCfsyjZWqq3atafdrdE9t7U4tJ6MwWkk z08tNa5GliVkVxrkBIWsOpUe/agWPjF3APUqjvR+t7qJRs88rBjxGBKMyuEUqRkWhppX A82qgCOuFTWFlwjaQUc0TXLqmcALcZIiCuv7Si5H2YDciNr1nxrhT/bQKW77It2ozSyr cYCrtln5B4QGSFhOKWIgQBDgJpdMHayHL7em/oKX8vD8ubGD+Mofm2+GR3a5Yjsihk7I Bs+g== 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=bWJXy3isW8ZPLrIlYrjTHLfcSCGhCx6CqtUu4Xc/ePs=; b=EoIz9zSMCTxQrNnLHMWZxMl3mSg4QEDUguEMGNZpbHxMUrub6Qu8XR7KJ4XKxBIVJm QccEB+nNns9uSilXSKvBc9gqB122crUC6fgAF2aT+FQqDycZc6UDgwYqkswo3IVOfwWB tW0cM+yGZ2Nzxe6Z7is4yIhTkGbUgV6DgPsk6oIIyV6bvOORNeKbAvxChC3J5xv6feSm iOcuXi+R3okuZCdUay94RNwOZdNaxEaGyYwaLXLCRC1/MmifTLhlUai83ztd616WJU0K b74LHbLnHJVbxcmtKb6uWOnHVtxcrQIsIOAkP7YnHzwBFVjO1pdlXEJzHxrkhLm348rs rCuw== 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 f4-20020a17090274c400b0017508e502a1si95493plt.289.2022.10.13.09.13.24; Thu, 13 Oct 2022 09:13:45 -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 S229663AbiJMP6S (ORCPT + 99 others); Thu, 13 Oct 2022 11:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229620AbiJMP6P (ORCPT ); Thu, 13 Oct 2022 11:58:15 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5C320DAC7B; Thu, 13 Oct 2022 08:58:13 -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 2C1C813D5; Thu, 13 Oct 2022 08:58:19 -0700 (PDT) Received: from [10.57.5.87] (unknown [10.57.5.87]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A70873F67D; Thu, 13 Oct 2022 08:58:11 -0700 (PDT) Message-ID: <77cfc218-0c87-7dd7-6f60-2c2c12f9f892@arm.com> Date: Thu, 13 Oct 2022 16:58:10 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] thermal/governors: Remove integral_cutoff parameter, IPA is more regulated Content-Language: en-US To: Qibo Huang Cc: rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rui.zhang@intel.com References: <20221013090733.28462-1-huangqibo.tech@gmail.com> From: Lukasz Luba In-Reply-To: <20221013090733.28462-1-huangqibo.tech@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE 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 Hi Qibo, On 10/13/22 10:07, Qibo Huang wrote: > Reason 1: If the integral_cutoff parameter is 0, > the current temperature is greater than the control > temperature, and err_integral continues to increase. > If an abnormal situation occurs suddenly, the err_integral > value will become very large. Even if the current > temperature is lower than the control temperature, > err_integral will always exist, which will cause the > IPA to run out of control and cannot return to normal. > This is the problem I'm actually having. > > Reason 2: The integral_cutoff parameter is difficult to > confirm the optimal, and can not bring good results. Have you tired different 'k_i', 'k_po', 'k_pu' settings, not the default from binding estimation? These coefficients help to control the behavior of IPA and how good the control loop could work. The integral cutoff in default is set to 0, which means we account the error when we overshoot the temperature vs our desired control temperature value. Please also pay attention to the type for those variables: err, i, p and how they are treated (and when). In current implementation we account 'err' negative, so we reduce the power budget. Next time, even when we are below control temperature, we still 'remember' those overshoot mistakes, so we upfront shrink the possible budget (to avoid overshooting). We clean the accumulated error when the temperature drops below 'enable' trip point. Could you describe a bit more what kind of problems you observe, please? Regards, Lukasz