Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp1912900yba; Fri, 10 May 2019 03:15:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqyJCzWpn6tkDkV4mycrAm9z3Lk/bKGYZD6dHgcHA+ZPvSSltXeNfbeMypP8k2QXB+m20Pyk X-Received: by 2002:a63:da14:: with SMTP id c20mr12377240pgh.191.1557483307997; Fri, 10 May 2019 03:15:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557483307; cv=none; d=google.com; s=arc-20160816; b=JyRVA4JcdqJxvpQXohdmrMGL4Oz0z88pJnkfqL6rvKN3hHNsAa/Wqe1OJHy/GPNXph ECHEjp7ef2K2VR4Aqe531pCqT59v9xpJkIbc8P5e6UVZnlLQSuKDA5dowYc3P+FomJLD vNNMbGw5FoOCX3nZdjsJGcQD+Zn5cllqhlKMjSasbS4tiXlbV8e/JuLfhyE0SQ2+O6y0 68fWpxkIPqPL4xrdDbFit46f6IIylViPxTaYpWD8mcRbFfvydbQBFRW+5VWVdl3MDQ3Y KOE7R2IRaX1pD35pH/krKrt1NpzwFCkyrRuOSDcoPtzvFa9NAbi/L9nlqUCs8hWTxDbW W3NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=YEAAdnjFo5d+nFsQyBOaqPUBBRxUoX1ZF3WyvxMrBkU=; b=MdzKE+ZQLgtvcRHcdoZW6XGo61/dUyeddxrjjO5+pMNGIHew5o7tF6/acsxiUX9qzA JxUTmSdr+ZXdJ9Zjb++e+MIVI1abFTsoDy6zoKWdatNrTF0qWUeh1Vj/fzo6ogGrwglH WI/HD/n0L4SZ/x+G8g2Ck27icxmMHex1D1tOYLUZl5iYWX9jzZHVCAtw0XwMfOpwpjMa kGefg30iUgn2RqsZK9PKqpVy74R7VPUWcDTpuRQ4HOwndhCe0qAZxhdC8mqubBUApriD ZtMGPg/xKHMzNA/3uxUNM6st7Ry6e4GhZgeooPtt1dZll+9RPoZw8GYeF1kjb0wO10Js q5HQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dl1ae2wH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p12si6746075pgn.431.2019.05.10.03.14.49; Fri, 10 May 2019 03:15:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dl1ae2wH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727333AbfEJKM0 (ORCPT + 99 others); Fri, 10 May 2019 06:12:26 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:34558 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727240AbfEJKMZ (ORCPT ); Fri, 10 May 2019 06:12:25 -0400 Received: by mail-pl1-f196.google.com with SMTP id w7so2638126plz.1 for ; Fri, 10 May 2019 03:12:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=YEAAdnjFo5d+nFsQyBOaqPUBBRxUoX1ZF3WyvxMrBkU=; b=dl1ae2wHT+zVPYcECGFIgL/JB+F87tAIPyE5pOOUzeAWOS8WhEZFvYwWwvDt6dQfgl Sij0E5EcRupjwid6veCbXVlELd9V4px46nUA76L/Ai8p6ARnK8ST9zb5Ec8Pm85yVDbp 7e9ecxLxiR7+VeJkkfIEvNeqH2Udtv6W0KSgIjZ3p82GQFvga5A51plKiGWCVJ9Ku9PS vaSndTfCi3RIhfoFOLxje1cSNTFWABYzd+t6143p8X2M48ByiV9Zr6hJdgDUO8KSnbOx /Q9xTOyATyexqP+H41AZg6czlsQXGWjTK4FwgW74IdyATyMZFQDa1CL6t3ACjeCQi3zO 3q5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=YEAAdnjFo5d+nFsQyBOaqPUBBRxUoX1ZF3WyvxMrBkU=; b=m0qj3Bk13u0+vSI+7mGvbhzM5zTAPFXGPulr13OPBnljgCHdOKGBtW2lq/P4qXeE5Z 1Nw0rqh3X+lb5EPZtiEkyD9zbp5doU2w4bymwXqsDcV0SY5wRZId3o7eoGEou9VSU3jV xJXMKrvVopoe+2nCD753NQYOO9l1M/tRhEd6LtfnGhSlXZ3R2CSR6Bl5dbonQPxjpqeX qODhdt+06tEG30zjlEQXYjnqQTfcGCyKhWC0m9g8SEjOqzxvzmoNL7VAbx/kCJ7yAgXl VkoiGtTQPorKc3x5S6bwYRSaRsesdAgSTdCTiNCCFN7oJkE5j2POvA2iEcAaf5TSg+cV ipgQ== X-Gm-Message-State: APjAAAWmJ27793TwAWmVJ57fDVerw59hJcZKqEDRTpAgO19UrTjPDrm5 HtfuCHMZtEF87cLfD5tFNDmWEQ== X-Received: by 2002:a17:902:d24:: with SMTP id 33mr11638563plu.148.1557483143830; Fri, 10 May 2019 03:12:23 -0700 (PDT) Received: from localhost ([122.172.118.99]) by smtp.gmail.com with ESMTPSA id b14sm5970214pfi.92.2019.05.10.03.12.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 May 2019 03:12:21 -0700 (PDT) Date: Fri, 10 May 2019 15:42:19 +0530 From: Viresh Kumar To: Andy Tang Cc: Daniel Lezcano , Shawn Guo , Leo Li , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "rui.zhang@intel.com" , "edubezval@gmail.com" Subject: Re: [EXT] Re: [PATCH v6] arm64: dts: ls1088a: add one more thermal zone node Message-ID: <20190510101219.oruzvzlk7mm6iahw@vireshk-i7> References: <20190423022507.34969-1-andy.tang@nxp.com> <20190510031335.GD15856@dragon> <9fb2e306-38c7-2af7-5470-ff5bc4e23370@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20180716-391-311a52 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10-05-19, 08:47, Andy Tang wrote: > + Viresh for help. > > > -----Original Message----- > > From: Daniel Lezcano > > Sent: 2019年5月10日 15:17 > > To: Andy Tang ; Shawn Guo > > Cc: Leo Li ; robh+dt@kernel.org; > > mark.rutland@arm.com; linux-arm-kernel@lists.infradead.org; > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; > > linux-pm@vger.kernel.org; rui.zhang@intel.com; edubezval@gmail.com > > Subject: Re: [EXT] Re: [PATCH v6] arm64: dts: ls1088a: add one more thermal > > zone node > > > > Caution: EXT Email > > > > On 10/05/2019 05:40, Andy Tang wrote: > > >> -----Original Message----- > > >> From: Shawn Guo > > >> Sent: 2019年5月10日 11:14 > > >> To: Andy Tang > > >> Cc: Leo Li ; robh+dt@kernel.org; > > >> mark.rutland@arm.com; linux-arm-kernel@lists.infradead.org; > > >> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; > > >> linux-pm@vger.kernel.org; daniel.lezcano@linaro.org; > > >> rui.zhang@intel.com; edubezval@gmail.com > > >> Subject: [EXT] Re: [PATCH v6] arm64: dts: ls1088a: add one more > > >> thermal zone node > > >> > > >> Caution: EXT Email > > >> > > >> On Tue, Apr 23, 2019 at 10:25:07AM +0800, Yuantian Tang wrote: > > >>> Ls1088a has 2 thermal sensors, core cluster and SoC platform. Core > > >>> cluster sensor is used to monitor the temperature of core and SoC > > >>> platform is for platform. The current dts only support the first sensor. > > >>> This patch adds the second sensor node to dts to enable it. > > >>> > > >>> Signed-off-by: Yuantian Tang > > >>> --- > > >>> v6: > > >>> - add cooling device map to cpu0-7 in platform node. > > > I like to explain a little. I think it makes sense that multiple thermal zone > > map to same cooling device. > > > In this way, no matter which thermal zone raises a temp alarm, it can call > > cooling device to chill out. > > > I also asked cpufreq maintainer about the cooling map issue, he think it > > would be fine. Yes, you asked me and I said it should be okay. > > > I have tested and no issue found. > > > > > > Daniel, what's your thought? > > > > If there are multiple thermal zones, they will be managed by different > > instances of a thermal governor. Each instances will act on the shared cooling > > device and will collide in their decisions: > > > > - If the sensors are closed, their behavior will be similar regarding the > > temperature. The governors may take the same decision for the cooling > > device. But in such case having just one thermal zone managed is enough. > > > > - If the sensors are not closed, their behavior will be different regarding the > > temperature. The governors will take different decision regarding the cooling > > device (one will decrease the freq, other will increase the freq). > > > > As the thermal governors are not able to manage several thermal zones and > > there is one cooling device (the cpu cooling device), this setup won't work as > > expected IMO. > > > > The setup making sense is having a thermal zone per 'cluster' and a cooling > > device per 'cluster'. That means the platform has one clock line per 'cluster'. > > The thermal management happens in a self-contained thermal zone (one > > cooling device - one governor - one thermal zone). > > > > In the case of HMP, other combinations are possible to be optimal. But not sure how I missed the obvious, though I do remember thinking about this. So the problem is that the cpu_cooling driver will get requests in parallel to set different max frequencies and the last call will always win and may result in undesired outcome. Sorry about creating the confusion. -- viresh