Received: by 10.223.176.5 with SMTP id f5csp579817wra; Fri, 2 Feb 2018 02:45:01 -0800 (PST) X-Google-Smtp-Source: AH8x225o6yUdjEC9ZHX1NTZU2bWAzfi6pWJd9yhXlIhBOCkFukPSoM7efpGDgXLEggSr+Ea9UXtZ X-Received: by 10.98.23.23 with SMTP id 23mr40357031pfx.179.1517568301580; Fri, 02 Feb 2018 02:45:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517568301; cv=none; d=google.com; s=arc-20160816; b=QPyNONYccoylCADY3MLAf/nmdTVyrt15aE7KYr1LNAas/JgcOq9B6EPE5sBHCUVivC 0ReRi9cr3w05yI88Yj1cEqMd9R+kSutHsGoyNdzX+A1CJPV9ZvGSfW921fDbrbEMGRHF hPzEiGGun/8Vx39wRcmRmcluwtHg7ihQV3XiGyKDYsx4V5xTp4F3ENfQGJ1DfdbeaF8G G3EijKfXmCjEKcnvg6ByT/X01784RfKPwvromwu/VT7Z1OMR9uiohohw8CnBltAw0GOk bH6ZmiPD/TNqjsUFJLQqbSef8RG+powbpJNzFWhgMdF5SZVjJhRX16KzSzdZq72X/4kn 53BQ== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=1/D2ybOUrUgs4Eq3TfRCPl46tOO/MuY2HbhPXDqwqZ8=; b=cEvoErrXSY4YPfyNMoTCHwpUM/dkVmKb/8u/uMWU1gANUPDAtLd9vZyUCXwyFgp8ra DAjDdPSHTJSAZXGz2jJBTgf3L3N93cHkOcIFjpL5VSJaQh0jLXaxyIpz85PQjyDL2nT7 QDy/AaXgv6nAgRkBALzQHqrs4McZRg+itkcGKqTAvivS1k7y7iJSKWe1kKbRRErGyS6m Y0N9O3hO6kPPYnJyBFwm/iiAV94qm1q8fBJajKBP7faKERycoFC7UX4WNwa3eEc3B8pk 9SLGXgoVwIhyZFxVSBdphljXIWgISnuq3ID9UuDOonULckwNUGMI5U3yWJrKkJdksxe0 NTJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OyLcuc+I; 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 w6si1494928pfj.311.2018.02.02.02.44.46; Fri, 02 Feb 2018 02:45:01 -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=OyLcuc+I; 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 S1751853AbeBBKnK (ORCPT + 99 others); Fri, 2 Feb 2018 05:43:10 -0500 Received: from mail-pf0-f177.google.com ([209.85.192.177]:38847 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751671AbeBBKnD (ORCPT ); Fri, 2 Feb 2018 05:43:03 -0500 Received: by mail-pf0-f177.google.com with SMTP id q79so516635pfl.5 for ; Fri, 02 Feb 2018 02:43:02 -0800 (PST) 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:in-reply-to:user-agent; bh=1/D2ybOUrUgs4Eq3TfRCPl46tOO/MuY2HbhPXDqwqZ8=; b=OyLcuc+Igb/F65f0OqYTwERzAAEqhW/k+cLGZUjgklCkEIcGdqwRdY4EWvS9zCIxvT d4Je3MU0eQ/CA1zTklny15QnNKhezkaNr6+7z4wfS8IgMhHkiBSkXcxOT/m+N0BLu/Hm oHgv1WbSeppipwGxBOPiIhYvdC5wX4vYviTkM= 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:in-reply-to:user-agent; bh=1/D2ybOUrUgs4Eq3TfRCPl46tOO/MuY2HbhPXDqwqZ8=; b=NWde34P8JmEknFTkwysDaNZ6wOc1kCjSb29st74wwIZ4aXCy/DRT5CNi/Cy7t1b0kr M6RNquQ6chKE4LyzQfTVbYd3rcILti0LJDmczXKMSH9WwmYfx/nmOaR5lvcsbdTBb3jX IEYeHkV4VxzEci2gNz9/QlCqOkNefKFvXZKUQpggVqLkU3BOoawrmWhxyVXJoXBrAj8P EIJtXvzGPKsKgXWrMXmfDlH7QFxBLPBj22ns5LnPUyolKxKNDnjqHY2EqAEKXXw3DWbA 4erua4kVYYaLA4+RPRDSOsKEmxrRm1RkEEC/rWH7cc64MHuD044CuCrQeODMvDfPBjOV vKyQ== X-Gm-Message-State: AKwxytdbAIGKcfeOX0Ldu+Hdz3RLzT9wRtaTZfUxOL2ZwWhZeWopfZSL Q28nyQIwQ8kIUPVeDNdDj68ahw== X-Received: by 10.98.138.21 with SMTP id y21mr39997540pfd.147.1517568182220; Fri, 02 Feb 2018 02:43:02 -0800 (PST) Received: from localhost ([122.172.75.97]) by smtp.gmail.com with ESMTPSA id a6sm2491983pgq.56.2018.02.02.02.43.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 02 Feb 2018 02:43:01 -0800 (PST) Date: Fri, 2 Feb 2018 16:12:59 +0530 From: Viresh Kumar To: Daniel Lezcano 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 Subject: Re: [PATCH 8/8] thermal/drivers/cpu_cooling: Add the combo cpu cooling device Message-ID: <20180202104259.GA28462@vireshk-i7> References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> <1516721671-16360-9-git-send-email-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1516721671-16360-9-git-send-email-daniel.lezcano@linaro.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, 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. 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. - 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 ? -- viresh