Received: by 10.223.176.5 with SMTP id f5csp2350017wra; Mon, 5 Feb 2018 02:33:29 -0800 (PST) X-Google-Smtp-Source: AH8x2241ykOjpZd6WNtkG77hN0DIb3wpf7hzPvNioMe4QKnn3xkWNA+2xkaANN4kUeccfHE07Q7d X-Received: by 2002:a17:902:60c7:: with SMTP id k7-v6mr6992982pln.316.1517826809527; Mon, 05 Feb 2018 02:33:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517826809; cv=none; d=google.com; s=arc-20160816; b=VHysiip/P+2Xpunt/jH4BBKnT/RzmPZYDhAHpVG0uAnfamrSCecFjKJUXj0EGN5b+r IjMUir4L7zocyRG8J8hNV62T9hCCYoTwC5gLoGjEXocxyR5Rsxf2MjYLP4hmMzHrlVYP O0NOUg6UfiMO4EE8KA2Ujxhy2fgxR1x/WOKi2JWLgvD4T7WzqQEYTK9dwdlc7GJeqws5 s7j4+AP5XEtzoRgPIQQicjEePRghm6kBm1QeUeiHtmWFa40XuY+LNjrTPHgVjn60ZD6n fpNGjsSwCUzPjkwa4lD0nM4DUZO0Yhm4bbfC6rK44kH6WqXbyLbCiXSyQ4b6A/Iby44u HXsg== 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=aziifthYnejOCU37JxVlqEyhZ0JPnNf9dYMdSkmB9aA=; b=RIHlZDwr2wFV2EamblIsfUSxJykkiBM3heSWNFz9pQxIUx6T6MdLxHKrhB4KaqVBvw kme/RIBCLp6ZAkFKq3DHQjpcsNpMB9XwUCSl58ZmVp3kw4uUnl9q9e4NNj3uZkKdVkth tbGoEm47owVlsdd8qPKzMR4WspmTv9kQjvkrZ1uWlevOm+O/y+/zWDGtGfRpJ86SJfwT uC8UNsfLS/A2OpUDapO9ZYx8T4loP6h8jeP2WA/ke/Fpt1gANKSn9Iq0duTKJtoWN66d kShgVdiQ/GEG2DLoX8zLS2Cy0jhwT0Po1RSiKLbZd2JrpI05mNipOOT/FYNwzlWu5XKy wakw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hDz+ffkp; 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 v6si3046621pgc.509.2018.02.05.02.33.14; Mon, 05 Feb 2018 02:33:29 -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=hDz+ffkp; 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 S1752767AbeBEKcf (ORCPT + 99 others); Mon, 5 Feb 2018 05:32:35 -0500 Received: from mail-lf0-f51.google.com ([209.85.215.51]:38174 "EHLO mail-lf0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbeBEKca (ORCPT ); Mon, 5 Feb 2018 05:32:30 -0500 Received: by mail-lf0-f51.google.com with SMTP id g72so40951676lfg.5 for ; Mon, 05 Feb 2018 02:32:29 -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=aziifthYnejOCU37JxVlqEyhZ0JPnNf9dYMdSkmB9aA=; b=hDz+ffkpIUWLZokaWqvo49v6T5IXqmAIh7aV66eDdjmKl0WZFNzT7C/BwTuVdv9uh5 Ypxj0Y6Rve4PlD+l5ncCkTr9JoNnzKsGlIjWvzFW8z+Yo6d64Ue1Qr9VvHF3BvwCQmzx pb3KrToOdktMmO2sYbxCfYs8Dgu3hWrkt8BVo= 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=aziifthYnejOCU37JxVlqEyhZ0JPnNf9dYMdSkmB9aA=; b=g1kobl94+U48zyliJ/Tnj36xRp9D7Z00B75FjsPKkPnM3rtfp+Krxl5ti2ydWS7Mjw xI0vDThoj25EYwUOThujSXVoD7GyFL3t+XmMTGh6VBlCJjMXm1TDJI+yDTJBGbev1GL4 tS2n8g/wyYeZcKk75U035fM6jPwP3iRYQaHN+nXfxFMH5Jv5fC8iN+l5IZbJk/s42NVt eYT1BgWHj2Z+J7GnGo3zgSjhBsrxN9xGxbiW97ygbTqFNRtaOPJNAepBFRwqNr+ZSrw8 rTKdNoAxFvT06VrO2J79wwBMBJfVbU3jxveOJ1HiGIt5wB5QlNJMsSRjuKZKqaRhScd4 Td4g== X-Gm-Message-State: AKwxytdwBAGaLxA70Wmbhq2CEAeO9XNu9LlIsVMvpzzPT61YOQExp3JX UK/+hcAA1JQD+tb1B248mCTlgw== X-Received: by 10.46.82.220 with SMTP id n89mr21854072lje.145.1517826748498; Mon, 05 Feb 2018 02:32:28 -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 m26sm1745078lje.66.2018.02.05.02.32.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Feb 2018 02:32:27 -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> <8dadd854-25ac-68aa-aa9f-33ba76a137a4@linaro.org> <20180205041734.GD28462@vireshk-i7> From: Daniel Lezcano Message-ID: <911804cd-2f1d-a1f7-61a2-6c8b95a88d6b@linaro.org> Date: Mon, 5 Feb 2018 11:32:25 +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: <20180205041734.GD28462@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 05/02/2018 05:17, Viresh Kumar wrote: > On 02-02-18, 15:30, Daniel Lezcano wrote: >> On 02/02/2018 11:42, Viresh Kumar wrote: >>> 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. > > Right, but I thought the cooling-maps can help us specify different cooling > states for different cooling devices for the same trip point. Maybe my > understanding of that is incorrect. > >>> - 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. > > Sure, but that works by creating a virtual combo-cooling device instead of two > separate cooling devices and then there are several limitation (at least right > now) where it doesn't sense the real situation automagically. For example I > would expect the combo to just work with cpuidle if cpufreq isn't present and as > soon as cpufreq comes in, covert itself to cpufreq+cpuidle. I was just trying to > present another view at solving the problem at hand, not that one is better > than the other. At the first glance, it sounds interesting but I'm afraid that raises more corner-cases than it solves because we have to take into account all the combinations: cpuidle=0 && cpufreq=1, cpuidle=1 && cpufreq=0, cpuidle=1 && cpufreq=1 with dynamic code changes when the cpufreq driver is loaded/unloaded. I'm not against this approach as well as merging all the cpu cooling devices into a single one but that won't be trivial and will need several iterations before reaching this level of features. IMO, we should keep the current approach (but handle the cpufreq loading/unloading) and then iteratively merge all the cooling device into a single one with policy change at runtime which will automatically handle the cpufreq load/unload. However I'm open to suggestion. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog