Received: by 10.223.176.5 with SMTP id f5csp810185wra; Fri, 2 Feb 2018 06:31:36 -0800 (PST) X-Google-Smtp-Source: AH8x224lb2iAoZI5PGJxtAg6k1aYo4a+CPkBOdsaS8HTkACOC5VwSpUSjYaWGX7Y+4hqUUgQv6dQ X-Received: by 2002:a17:902:6087:: with SMTP id s7-v6mr34350328plj.6.1517581896611; Fri, 02 Feb 2018 06:31:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517581896; cv=none; d=google.com; s=arc-20160816; b=OE5pzFv/rB7365aLalf9/xozft9/zp+VnU2JR7c459FwTYBgrZ1WaoH1+A5xnRfpzR fxIqTOCcb+9RxUop37AAHjLYKT25yFLQM8jMp2eRNQs5XZvH+NdRrghseLzpUfHjm1Yc 7agmkQbaJ87uDaKA89VuYH+IPYd54LdvOd8S/ehFcw1o/pw6FmEtWkoUrvhts+EvuEmW dKOpS9OTCb1/XNlbpO62Y9G2MFchEHibk4MFFIjAbPuSudx0D4Boy1DXrndFGBSHOWGZ 7UBsBSNzPCqnKCLhR9d3rIdoqoDtN4jhSaQ7woJb2PIfvPg+8cYjiwzntAoyuofC1Fyn xnjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=luiCeTmPfWzKhe7XE1S81a9jMc/hnDL/sgEGT4DC5NE=; b=Jw0BqRpehiMekSEEFewX39aMXXKRc0L2mXxmr51WIRZHnWfjf/PGrnL/6LyP45Zw+B JlWa7UzecvdpBW/77O9DibmCLnzyKLa34hT1XgykFuFzRURMgKYQyLZeGbmMvO+aQyym NvhkJWhTtssGkxo2oEYoH4k8ysAUvxvbqaguo1RHcspnfVjg5moe8Veunhfuw/db+cMr VyPNmgc4zw3wlZdF/W/TrfMNSPq8ScIE0wvtk96HXr4+YnBwEqvwhZxEP8RPra0yzeh1 G9hAETm99SZRLYg+IVkfA6mhovSz49ElMESImpwRAPN6J48zQISujVvkzZ0NvcoFa1t6 49ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S50exYja; 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 y128si1887449pfy.110.2018.02.02.06.31.21; Fri, 02 Feb 2018 06:31:36 -0800 (PST) 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=S50exYja; 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 S1752154AbeBBOaV (ORCPT + 99 others); Fri, 2 Feb 2018 09:30:21 -0500 Received: from mail-wm0-f53.google.com ([74.125.82.53]:53074 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbeBBOaO (ORCPT ); Fri, 2 Feb 2018 09:30:14 -0500 Received: by mail-wm0-f53.google.com with SMTP id g1so13005521wmg.2 for ; Fri, 02 Feb 2018 06:30:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=luiCeTmPfWzKhe7XE1S81a9jMc/hnDL/sgEGT4DC5NE=; b=S50exYjaW8NDft6mrAlt9oIWLsD0kmQu1akB8GoMbxQL+YYrgHRhkZr3qYRzMTnq/o tdJr798Je6ba+82JWIEcGOuLkZO4SDsu0WzaBADR/Y4FF/ErDsCM6VnxQoaazHAalozA 21Y3/S+sz68rxKs3cwJr1nThMWVN80QKRxaMQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=luiCeTmPfWzKhe7XE1S81a9jMc/hnDL/sgEGT4DC5NE=; b=RsCRre3uyEKZKDhDsY/9+iqrjmv1NAP74pYp9FAQE/h6sQGunuNV+LjzGHvAZYM83T m1tZHDB26/WT5l/hfPjKCo4mW4LUC/FKwRAlFkx6KrMy3naQQbPjHNGTyIXfn4V70lde viqbMWzsMdnkrriDBj14zWY50tSSzWz8KeCxdK2yJ/Oh1k6I0V5ST2dt7V4aOPdSZJzH 4xxzdT/4Ci2wHAQZyyMAcp5j1k5Pj5gdI3+yxwenwdcZ5UfuuA4eksVshywCKVGnd2Oe SR3A4UbK94eMJ+Ilp7qFf7W08ah9wgEE7tWDKaq2myELvzBY4pDpYi3+RVENHZp2BIaq ItIA== X-Gm-Message-State: AKwxytdjj/589iyNaUbNWW1WMGsmLLFDZxlCgdJeOEg7U8THBOx8Xkml TpQ3pT8LJ3s2VxdM8O6ZXbaHXQ== X-Received: by 10.80.196.73 with SMTP id w9mr61516871edf.293.1517581812699; Fri, 02 Feb 2018 06:30:12 -0800 (PST) Received: from [192.168.1.75] (lft31-1-88-121-166-205.fbx.proxad.net. [88.121.166.205]) by smtp.googlemail.com with ESMTPSA id q45sm2083142eda.53.2018.02.02.06.30.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Feb 2018 06:30:11 -0800 (PST) Subject: Re: [PATCH 8/8] thermal/drivers/cpu_cooling: Add the combo cpu cooling device To: Viresh Kumar Cc: edubezval@gmail.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, linux-kernel@vger.kernel.org, Zhang Rui , Javi Merino , "open list:THERMAL" , daniel.thompson@linaro.org References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> <1516721671-16360-9-git-send-email-daniel.lezcano@linaro.org> <20180202104259.GA28462@vireshk-i7> From: Daniel Lezcano Message-ID: <8dadd854-25ac-68aa-aa9f-33ba76a137a4@linaro.org> Date: Fri, 2 Feb 2018 15:30:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180202104259.GA28462@vireshk-i7> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02/2018 11:42, Viresh Kumar wrote: > Hi Daniel, Hi Viresh, > I have gone through the other review comments, specially from Daniel T.. While I > share some of his concerns, I have few more of mine. > > On 23-01-18, 16:34, Daniel Lezcano wrote: >> +late_initcall(cpu_cooling_init); > > For example, this thing isn't going to fly nicely as you have assumed cpufreq > and cpuidle drivers are going to be part of the kernel itself. What if they are > modules and are inserted after late-init ? There are more cases like this where > the cpufreq driver may unregister the cpufreq cooling device on the fly and then > add it back. And so this stuff is a bit tricky. The cpuidle driver can not be compiled as a module. Agree the cpufreq driver can be unloaded and this part needs some adjustments. > Here is how I see the whole thing now: > > - Yes we need individual support for both cpufreq and cpuidle cooling devices, > and no one disagrees on that I believe. > > - There is nothing in the thermal framework that disallows both cpufreq and > cpuidle cooling devices to co-exist. Both would be part of the same thermal > zone and so will get throttled with the same thermal sensor event. And so we > will end up trying to cool down the SoC using both cpufreq and cpuidle > technique. No. It does not work because we will need different state for each cooling device and we need some logic behind. > - Now I am just wondering if we really need the "combo" functionality or not. > Can we fine tune the DT cpu-cooling properties (existing ones) for a platform, > so that it automatically acts as a combo cooling device? I am not 100% sure > its gonna fly, but just wanted to make sure its not possible to work around > with and then only try the combo device thing. > > For example, suppose that with just cpufreq-cooling device we need to take the > CPU down to 1 GHz from 2 GHz if we cross temperature 'X'. What if we can change > this policy from DT and say the cpufreq-cooling device goes to 1.5 GHz and > cpuidle-cooling device takes us to idle for 'y' us, and the effect of > combination of these two is >= the effect of the 1 GHz for just the > cpufreq-cooling device. > > Is there any possibility of this to work ? It does not make sense. The combo does that automatically by computing the power equivalence more precisely. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog