Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp688436rwe; Fri, 14 Apr 2023 08:27:05 -0700 (PDT) X-Google-Smtp-Source: AKy350ZnMeMrnRoEVw1ortka5q7sGTCwwk6RQ/GXxCQSBCGYAvsny/tus0jh/XHwofzpevyz0bLu X-Received: by 2002:a17:90a:94c4:b0:236:73d5:82cf with SMTP id j4-20020a17090a94c400b0023673d582cfmr6289611pjw.9.1681486025149; Fri, 14 Apr 2023 08:27:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681486025; cv=none; d=google.com; s=arc-20160816; b=c7ucVgssOrbGjeI4mKPVdLsYzlceUeF+5JK78K6iq0clsC0NiKMO7fMmzPn2ggYJLq 9eu2curG2PTmFpD8StjJ/qjUUOtrNd/QZcHieP4YPiBz4y5bCiRZxa4q3pNUf8yrUYWU u+sKOfjnlhNJUS/hDvlA+62AfhHleLUWWyWRxY0a9YE+BwCth1htt9nM7M6RiHbWSYBr aWAnX2W5wMH86GaXEHTi5oHbz5eY7uMrDtndN5vrCftvcvT3rC/g4u+gFtkmNBj8tn77 ft+iOlEAyB+7MwsOYdpLMNlB/pJzT3AQWjNnZtANNFyMxaY7F+bzqRPnViB7qqQ6mwwz vgTQ== 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=suatdCpIRp+mMDS10KK8B9TWH5hqS6MG3VF01hGvi8k=; b=eO/YdWadh8X5AaSj41mGGJOASrSj/Qhw1Zw+iKJOhpXqQhwQe54VnJUXC3dbczxW7V 98NWE82olGq5d+jLDAehC9geDiKNCXlrjvlkrUfs1cFkCfC22uTipp6e5gIKEt2PSEAv wJ2K0DPPse+Pzi7MIaOBQcOraWaLAGBPgSQoXGgwPml4CunavI8WsPdYwC96nndUke9N S3oxnsO4sBqtZWURo1iKKifNA4Yl1IofMpVLE5F+6gQZfg1MlpAo3UrRlJ4MZQn3BsEC qklA0eWdiSPSXhhgiimdFjnpXvJv4uM6ce/PeGFTOkQvY7PbneELWHWEWLk+vgmFCebd IZaA== 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 2-20020a630d42000000b004fb7e7ef77dsi4890456pgn.693.2023.04.14.08.26.53; Fri, 14 Apr 2023 08:27:05 -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 S230399AbjDNPVI (ORCPT + 99 others); Fri, 14 Apr 2023 11:21:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229866AbjDNPVH (ORCPT ); Fri, 14 Apr 2023 11:21:07 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 98F4810C2; Fri, 14 Apr 2023 08:21:05 -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 8E28A2F4; Fri, 14 Apr 2023 08:21:49 -0700 (PDT) Received: from [10.57.19.153] (unknown [10.57.19.153]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 02D153F6C4; Fri, 14 Apr 2023 08:21:02 -0700 (PDT) Message-ID: <6022d391-9ae8-2bb4-0f81-2c99466dc556@arm.com> Date: Fri, 14 Apr 2023 16:21:01 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH V3] thermal/core/power_allocator: avoid thermal cdev can not be reset Content-Language: en-US To: Daniel Lezcano Cc: Di Shen , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, xuewen.yan@unisoc.com, jeson.gao@unisoc.com, zhanglyra@gmail.com, orsonzhai@gmail.com, rui.zhang@intel.com, amitk@kernel.org, rafael@kernel.org, Di Shen References: <20230320095620.7480-1-di.shen@unisoc.com> <6055bc39-5c00-d12f-b5c3-fa21a9649d63@arm.com> <637a3bb1-ba1c-e707-01b7-06c1358583ca@linaro.org> <6aad180f-410c-5b11-b30b-c7bc02cbe054@linaro.org> From: Lukasz Luba In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 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 4/14/23 16:06, Daniel Lezcano wrote: > On 14/04/2023 16:18, Lukasz Luba wrote: >> >> >> On 4/14/23 12:12, Daniel Lezcano wrote: >>> On 13/04/2023 10:40, Di Shen wrote: >>>> We have discussed this question in patch-v1: >>>> https://lore.kernel.org/all/f6aaa5f1-495d-a158-14d8-ddb2bffbd9c2@arm.com/ >>>> >>>> Simply put, we use the trip_temp in the Android System; set different >>>> trip_temp for thermal control of different scenarios. >>> >>> The changes are dealing with the trip points and trying to detect the >>> threshold. That part should be handled in the thermal core or thermal >>> trip side, not in the governor. >>> >>> AFAICT, if a trip point is changed, then the power allocator should >>> be reset, including the cdev state. >>> >>> It would be more convenient to add an ops to the governor ops >>> structure to reset the governor and then call it when a trip point is >>> changed in thermal_zone_set_trip() >>> >>> >> >> Sounds reasonable to have a proper API and fwk handling this corner >> case scenario. >> Although, if there is a need for a 'easy-to-backport' fix for IPA only, >> I agree with this patch, since it's straight forward to put in some >> Android kernel. We can later fix the framework to handle this properly. >> Anyway, both ways are OK to me. > > Unfortunately, we can not do the maintenance of the Linux kernel based > on an 'easy-to-backport' policy to Android. > > This patch could be applied from-list to Android as a hotfix. But for > Linux the fix should be more elaborated. One solution is to add a > 'reset' ops and call it from the trip point update function. Fair enough. > > Did you double check the issue is not impacting the other governors too ? No, unfortunately, I haven't checked other governors.