Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp2147322pxb; Mon, 18 Jan 2021 09:22:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJzuYSuAJzf10dj9Pa58SgmzBV9/gOaCIHJNSbjA4RThoLIFZGL+gbBNyNQBK2pzcjtxTBo2 X-Received: by 2002:a17:906:c10e:: with SMTP id do14mr517485ejc.166.1610990538615; Mon, 18 Jan 2021 09:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610990538; cv=none; d=google.com; s=arc-20160816; b=iyjt3FzBWaG1vjekExwWUqRVf6c2u1j+pxPxWtkyC1aT1AcJqQt4JzYNwDXYMrO2Gw FOf+bV/pTQfOT5+jxWyOcr7XOJuvR/KMWfs/hvDqvexhe5gv/OE2lw+/b4UDzPHP0dCY 85OvTLk6XhbzygP9BY88WhnmEzVorqiaOTDqplgfIAlVhVLCugLpoA3JttDO3ejdQ7LS HbZSwpKNm3XXGkRsR2vwedv8fRFkQ8sZVOPvQnicj+DXzgPR317ykUuteRU2PT+QD7bW Vq8u6E5KQ0rlfd7i7mx6n5bzLjn6kO/xHJvBptYnnsEgQyWQmPOSZ9pVzv+zVYBOgy/q G2sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=ifBx2O2MwNcHHelRrKvgPCfKHvyfUAmDUESSZXyXCh4=; b=KvsdEvzkJShUQwtPXCR6JZjDMd/Wwq4JpWhhQi8BODD5a/cq7PsW7Seik4nkm6qX2U j6S4kHRlS5EvvWLckx4MA4HXrSONv07DE3LnUTJTPrmpJsOQ4Sim2Fert3k7i/Cw+FmQ wzUH3LZY/LuLetkjhcj1u1e5rL8blnSl0Ghfy4irj5x1G0+x8Ugvu+QoJCleV6lhoJik /W8p79r7Mzm5XWS/mzFeM1/ld1S4tcsPOe9Ee6cfgBiSlKcCLC8Zy1IqX0jysolkzC9E filILFEP3BKUgeQoogq1Ty59jAM9HPeZdLECAMraH2M2wGtKgJBnuvBNrf98KR+uw8GW gAQw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bs15si7215955ejb.717.2021.01.18.09.21.53; Mon, 18 Jan 2021 09:22:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S2393581AbhARRRE (ORCPT + 99 others); Mon, 18 Jan 2021 12:17:04 -0500 Received: from foss.arm.com ([217.140.110.172]:39796 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390188AbhARRQ1 (ORCPT ); Mon, 18 Jan 2021 12:16:27 -0500 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 11D7F31B; Mon, 18 Jan 2021 09:15:42 -0800 (PST) Received: from [10.57.2.166] (unknown [10.57.2.166]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C8D4A3F719; Mon, 18 Jan 2021 09:15:40 -0800 (PST) Subject: Re: [PATCH] thermal: power allocator: Add control for non-power actor devices To: Daniel Lezcano Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, amitk@kernel.org, rui.zhang@intel.com References: <20210105190107.30479-1-lukasz.luba@arm.com> <3b98cbfa-3bfb-607c-aa4d-2c2ef3e61990@linaro.org> From: Lukasz Luba Message-ID: <2550a12b-aed6-dd89-0260-69241d04d39b@arm.com> Date: Mon, 18 Jan 2021 17:15:38 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <3b98cbfa-3bfb-607c-aa4d-2c2ef3e61990@linaro.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 1/18/21 4:07 PM, Daniel Lezcano wrote: > On 05/01/2021 20:01, Lukasz Luba wrote: >> The cooling devices which are used in IPA should provide power mapping >> functions. The callback functions are used for power estimation and state >> setting. When these functions are missing IPA ignores such cooling devices >> and does not limit their performance. It could happen that the platform >> configuration is missing these functions in example when the Energy Model >> was not setup properly (missing DT entry 'dynamic-power-coefficient'). >> >> The patch adds basic control over these devices' performance. It >> manages to throttle them to stay safe and not overheat. It also adds a >> warning during the binding phase, so it can be captured during testing. >> >> The patch covers also a corner case when all of the cooling devices are >> non-power actors. > > In my opinion this is a user space problem. If a device does not have > power information, then it should use the step-wise governor instead. > > It is not the power allocator to overcome a wrong or unsupported setup. > > Usually, the default governor is the step-wise and the userspace sets > the power allocator policy. True, but currently there is even no warning to the user, that some device (quite big, like GPU) is not controlled. This could be dangerous. > > A solution can be to fail to change the policy or bind if the associated > cooling devices are not all power actors. I tend to agree, we can simply 'fail' during the binding and print some warning. The code in that case would be much simpler. Let me send a v2 then. Thank you for your comments. Regards, Lukasz