Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3135761lqt; Tue, 23 Apr 2024 11:13:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw3vL8krGFlsvJCS3CTjAbS0U3Qkre9yJxCByyWjSYwzX44hYCIaWN0rurtP/KGTJF1M2R4SHlN2tMkksyEByNLt0xfXyxc/xyLqAHDg== X-Google-Smtp-Source: AGHT+IECdNzWqcrxQxFAZIWZ4BcE0ThJzBOy3OqPsDgdFySAiE6qSmYQjhEDnbicA00CAatiooTG X-Received: by 2002:a05:6a20:7628:b0:1aa:583d:6a72 with SMTP id m40-20020a056a20762800b001aa583d6a72mr107501pze.56.1713896033789; Tue, 23 Apr 2024 11:13:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713896033; cv=pass; d=google.com; s=arc-20160816; b=IZnfuDPWQgWLnh9w3ttT3pRPiVZwAHM/vvX9BP0aCcVIocFMg0XR0SmocYaMaZ1Lll OI3KEJ607qkrG5ys/nNwiHFU6d/a94PzM81fiipspwUnS7KFdG11z5ZCUtn8Gr20zrOR ZQnDMaIpspy9Stl7Wiww9AQMKWtFsRNEDH8lGuolHJvMvWbWUKestxFCmV2DSW+C+10v 2D4/A1af/dBkMxvLXtBWGAZ0tE2xvRCpY1Yu7oM2HF8iaA4FXCBohSPU6HIgdA4fEwpY dtcPnI6lP5BST78aHAlB31YROi8IVf/6nMFIso2Y+9+pGkHlhfdSB7Bl9ckf0nVBGM9S rAjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=ZrPlhm46dVYsHXusJ+hWfPOX88ZyITI8Ng81vweSato=; fh=4VwtrgTY0SE5Mj472XWY7JlaVaU+ron8KKffgvV17qA=; b=V/kvoe3X+8cDVW9Sw95DzJ4oloGLFcLNPsX4QnELPkxsYh6Tzh8WNMNatARlYS913Q V6zIZzeJlJ1Bwqa+IPPDbS7QYEG6IqDnR6LXlUYfUlCi3SepjQ1nWy6J/t8swsv+WiCD HB5kWU0wD5mJfXVOnWJgG7PooCK44KWCqCAcTx5qzdbnEAMdPG4edXHK8u0gAMIx0dQD NrtRM3QNSypIzQX0tAtM8gHgR2abmqSK8cujCBaXJcVFC643HieYecLU55C6IlWRyw7K TfZ4mm63ubr+aFV5uZypzFACHd6oLg29ZZgE8G2YAiVqDsqAShsIFbNu5eil1JM76LPN qN+g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Q/FgQXI8"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-155722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id c22-20020a63d516000000b005d6a0068c1csi10160797pgg.95.2024.04.23.11.13.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 11:13:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Q/FgQXI8"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-155722-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155722-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D038A28F185 for ; Tue, 23 Apr 2024 18:03:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A9AB13FD75; Tue, 23 Apr 2024 18:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Q/FgQXI8" Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 16C6A13E03B for ; Tue, 23 Apr 2024 18:00:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713895237; cv=none; b=dBWZ+IMdgTwHevFCo6uIVsPfB+JcnVEvMTfb/dpAIEpr/sfMsPs2yQgbkywmMVmy38zcS/dcIURaniEm2WkXAEQe6ffJfk1P3dCA63uHMbvJqThjeJGqkvCdZKd9t/EISfvR0KVz7RwlFmoDg0AG3INfFIpWiEOR4py6BuvtF0U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713895237; c=relaxed/simple; bh=+Ycvpa9EG63dR81CHp5JkGsctcaf5dahBQ8q1erP7GU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=JqYMAHXt42gGxU1FYzleIZUhenwSMGcWGAIoYJfJC5XFvzRY0P9SqHFOhggvu5g2GCU7jyR6EvY7YGDo8n7/FIrSaJzSdKeB+gsa96q3VE+Om3ufIZl0yPYplNwT4YDtAc5KFDJ3KqLnKrIVhTofnBHZ/bYwbkS+Av6/NwTu5bg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=Q/FgQXI8; arc=none smtp.client-ip=209.85.128.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-41ac4cd7a1cso6438295e9.1 for ; Tue, 23 Apr 2024 11:00:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713895234; x=1714500034; darn=vger.kernel.org; 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=ZrPlhm46dVYsHXusJ+hWfPOX88ZyITI8Ng81vweSato=; b=Q/FgQXI86olQ97k3hGIw14RYQByjGCJ5vLqQJYqJabPsEFqVsU5zPyV5/jMzDveqcC 8ukn06NqaSKFVJ4q8ykkSEDguWJl3gpUxtbLdCtx1qk+vyURJJj46r87Eo9UP+I5BJ5f RMU3lQW6ufLPK326PsRE7iE84WndcXaCl1tDA1JT0e4rRrP2otv67PpzN9p8kglZK5o8 m02TchMPDf0UrM+DGWJQqfrSs0th2J0+vqNwd3Fs9yzKKXCIzrjvB8ksmngUOE6lIZuR NKxBnlcrOuQQ9rlj5lj6JNnsD7dUpf1GeQVR3tJ507xa3BlZNGALjJDJopie0nIkN9E3 nTVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713895234; x=1714500034; 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=ZrPlhm46dVYsHXusJ+hWfPOX88ZyITI8Ng81vweSato=; b=VwU5bU2e0ayIoqa/jQjqMRrknHI0WA2w9c3w+NzD3iXkbuX42mx/8NNgpq2I429g1B 5n2jMsElVU8oWPOqWRwrGUVI/q2EoDJMW1+DZUTORF0ceBZun760jUsdjF7s+OHQePVi CB2N+aL+43S9mS65TOFZd2NoKWc9u6nRnXvPk8kRvBdCFKbnfS+Jy2lFcxRZPN9jJ3QY +DF7MUhgOUP61PQiRkv7GPEt8Jy6tJdhi/+qHCanGXiciqK2+p/JqeC3XPYPcp+/i3RD Z5dtUmob7hYOymkVnHgcF2d2y26vGnWTDPs9NwoioSiZEcuJlWvm2qi296lgs/5harTj zRLg== X-Forwarded-Encrypted: i=1; AJvYcCWafNyVdWvfPglrCXCY2MVoudWpSTGXhK90LjOKmYje4HVJo5HIlVpLKiXpVmTiF+pVFIgTwibqOLBv2lQP1F3jLOA4wAdhMjKQi8QS X-Gm-Message-State: AOJu0YxFsygURgxWZ8JyirsO5EXGbkXceVTsa7m/sVkOjLmUrp93EuNW HGpU7dmK/LMQXWeVpGC5RjW00LW1mCQ4Ba2L7ma+JUiQrlhiG91bskPGWV8CRdg= X-Received: by 2002:a05:600c:3b07:b0:418:a2ce:77ae with SMTP id m7-20020a05600c3b0700b00418a2ce77aemr11122wms.27.1713895234395; Tue, 23 Apr 2024 11:00:34 -0700 (PDT) Received: from [192.168.10.46] (146725694.box.freepro.com. [130.180.211.218]) by smtp.googlemail.com with ESMTPSA id b5-20020a05600c4e0500b0041a7fe7a300sm6223533wmq.26.2024.04.23.11.00.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Apr 2024 11:00:33 -0700 (PDT) Message-ID: <33cafcb3-af9c-4058-b6b6-4e5aab6e21cb@linaro.org> Date: Tue, 23 Apr 2024 20:00:32 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 07/16] thermal: gov_power_allocator: Eliminate a redundant variable Content-Language: en-US To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Linux PM , LKML , Lukasz Luba , Srinivas Pandruvada References: <13515747.uLZWGnKmhe@kreacher> <1913649.CQOukoFCf9@kreacher> <8e26c3cb-1283-4561-95aa-30432f1d13ee@linaro.org> From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 23/04/2024 19:54, Rafael J. Wysocki wrote: > On Tue, Apr 23, 2024 at 7:35 PM Daniel Lezcano > wrote: >> >> On 10/04/2024 18:12, Rafael J. Wysocki wrote: >>> From: Rafael J. Wysocki >>> >>> Notice that the passive field in struct thermal_zone_device is not >>> used by the Power Allocator governor itself and so the ordering of >>> its updates with respect to allow_maximum_power() or allocate_power() >>> does not matter. >>> >>> Accordingly, make power_allocator_manage() update that field right >>> before returning, which allows the current value of it to be passed >>> directly to allow_maximum_power() without using the additional update >>> variable that can be dropped. >>> >>> Signed-off-by: Rafael J. Wysocki >>> --- >> >> The step_wise and the power allocator are changing the tz->passive >> values, so telling the core to start and stop the passive mitigation timer. >> >> It looks strange that a plugin controls the core internal and not the >> opposite. >> >> I'm wondering if it would not make sense to have the following ops: >> >> .start >> .stop >> >> .start is called when the first trip point is crossed the way up >> .stop is called when the first trip point is crossed the way down >> >> - The core is responsible to start and stop the passive mitigation timer. >> >> - the governors do no longer us tz->passive >> >> The reset of the governor can happen at start or stop, as well as the >> device cooling states. > > I have a patch that simply increments tz->passive when a passive trip > point is passed on the way up and decrements it when a passive trip > point is crossed on the way down. It appears to work reasonably well. Does it make the governors getting ride of it ? Or at least not changing its value ? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog