Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp369393rwe; Fri, 14 Apr 2023 04:16:41 -0700 (PDT) X-Google-Smtp-Source: AKy350aYvyVCoNbqJ8OT0P9HVMIeq9SKaU3mylttVqT5SODvHyfxNFIEvNXycyfpad7pGP/BWLbf X-Received: by 2002:a17:903:2055:b0:1a6:4c2b:9e6f with SMTP id q21-20020a170903205500b001a64c2b9e6fmr2315989pla.50.1681471001258; Fri, 14 Apr 2023 04:16:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681471001; cv=none; d=google.com; s=arc-20160816; b=o4+LDDocxKONf1tWQse75Dh4l57X18BSBKMRYA83tjquOVoXlps1YtXdEoiEl4NRRl iHUVunf/+EoPJvYGHF5YSaSRRiqBHUJYCFa+x9L2PA86+nk9yCoflcvqWbRjZpDbqM8m m9C35ESkuMQeo4FM7dzPa/wrPeiv5A6I0x6O7jJL6TI9/3AOwY9VxTwMnPYA9F1MObr1 ZOqau1X6VODrBSRv380lXLHIPz2zdf1HJUHKsbRk5gRYoZCCK+wjXqfAUAq3iUuMiw4n TaeblOI257Wqbx/hLJ4Z9lmUz6RSjqT8jktQxLqbKOMQRqTRrthX6EpXzS217Q6mI4sf e1NQ== 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:dkim-signature; bh=SEnulhA5VA3I1e5UG7ov0nIRMdi2PjIGPK3ZiIECZ0Y=; b=nLmrBPsglI5nWfteZxnEB5JJLLvVc4hp6y6Y768H2PEfIJiW5M6zOQL4cxq3cxahTO mBaqoc1mMEHRZfGtkzVmG3OhBpWnPpm08F8/F0u/WjZEHyX7L7q4JO2hHVOOba1WEXpi ZAucMaFd9vb0OBZNmA0opu6mTZsFlpoLQOaiPQ/TAgp6tRYsi5eKlhllOYEn7iiJOZxv 0uPv5AqpZadn2oFUTrBc7Hy1anQTfr1RTprWdeTZUf2JWmnDhIhJsvwT/PVYaTMlzmZ/ 9xSERB6qzMRt/d2UpHvkCkui9BAcB5ItI1MVpYU8m4ipREppABVP0MeNSwkhL5PgAjhc Qpfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hYaxh3J4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a170902c38200b001a69f1cea63si1377257plg.223.2023.04.14.04.16.25; Fri, 14 Apr 2023 04:16:41 -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; dkim=pass header.i=@linaro.org header.s=google header.b=hYaxh3J4; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229591AbjDNLM0 (ORCPT + 99 others); Fri, 14 Apr 2023 07:12:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229754AbjDNLMZ (ORCPT ); Fri, 14 Apr 2023 07:12:25 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E1FA57698 for ; Fri, 14 Apr 2023 04:12:23 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id o6-20020a05600c4fc600b003ef6e6754c5so7869602wmq.5 for ; Fri, 14 Apr 2023 04:12:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1681470742; x=1684062742; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SEnulhA5VA3I1e5UG7ov0nIRMdi2PjIGPK3ZiIECZ0Y=; b=hYaxh3J4LVdiZZ5grBlmO1PkwCItaOSHE9AcEhaKGDEXo6mHg6ZtWeai7jPoCYBCcu nQ2yfZAm6Pl75BLd+colZl5waBpHA5AVORT1OAUZXUrt1MoU0hIkd//gCfUq8xoLQKMx PXJZ962far8aZDjJgWE/Lst5AJVH47KAgPlrZ7p14WhwyGz2rXUENbUzR6cLN5ick+DK ICle8tBpEPheM+b4CHXSKgEfYuKGvgfKDeFLggzDiTFcV7MtDk1IOVxvqf5T5LK+eraR v0bxZYzJQcS2W9YG48YNsxEJTszWbalpBLhTAbukJ5VntykCnc0xmdemXf/p0qV9gfmI 3cZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681470742; x=1684062742; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SEnulhA5VA3I1e5UG7ov0nIRMdi2PjIGPK3ZiIECZ0Y=; b=RfDYlDzLX012TFO3a/7a00/junMliKiP4mrHRyIImqFFf2lhlmsZsbueUNND+6RPzf UFYO41Dgg1PocZIEuontyAk5NNFk5Oh3l3gW3nqCa8IbVxE0d9LRkf23bi00msvilxOv yxVJI3qk0RMS8FpEeD+QC5RRmQH/fhZOJbzksEGkm0iKdZhq9UoKZrFEMKnAVjCx8LZj TK85rqlt9mMWkR/ZxlS3BRxJIzkCW9l2nK/G3pj0QOGy8eRvdRmKYmWZspuXnJd7QL/1 677UFqvvF6bIh+E9xcfFBe0+lJ3allNOQ47Cew6Wa1MzkCB55qgXXz00cDt7OQKHmWmN rxCg== X-Gm-Message-State: AAQBX9cyMpV/+Fta1tQDw60r4p6aEqxhpldxnSLEJygQ4rMc02ZQXpqz hGAoDhyD1oxxnhexp3OTpa9DNw== X-Received: by 2002:a1c:7209:0:b0:3f0:9565:3f3f with SMTP id n9-20020a1c7209000000b003f095653f3fmr4614563wmc.3.1681470742293; Fri, 14 Apr 2023 04:12:22 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:7529:f7da:b8df:f1dd? ([2a05:6e02:1041:c10:7529:f7da:b8df:f1dd]) by smtp.googlemail.com with ESMTPSA id c11-20020a7bc84b000000b003ed2384566fsm4098856wml.21.2023.04.14.04.12.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 14 Apr 2023 04:12:21 -0700 (PDT) Message-ID: <6aad180f-410c-5b11-b30b-c7bc02cbe054@linaro.org> Date: Fri, 14 Apr 2023 13:12:21 +0200 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: Di Shen Cc: Lukasz Luba , 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 References: <20230320095620.7480-1-di.shen@unisoc.com> <6055bc39-5c00-d12f-b5c3-fa21a9649d63@arm.com> <637a3bb1-ba1c-e707-01b7-06c1358583ca@linaro.org> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 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() -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog