Received: by 10.223.176.46 with SMTP id f43csp616697wra; Fri, 26 Jan 2018 04:17:28 -0800 (PST) X-Google-Smtp-Source: AH8x225KYEgcLv69fMKu+52he3gPhxkQQKiUJCdUbDdpve0N6NKwiWy78GRn6V4iakbjTEQUPuuJ X-Received: by 2002:a17:902:8491:: with SMTP id c17-v6mr14348771plo.105.1516969048472; Fri, 26 Jan 2018 04:17:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516969048; cv=none; d=google.com; s=arc-20160816; b=bpPYmm+Of7o098rEb4dwh6DwH5IbCQfnc+zyw2V9A8E1PPcWiNmg69V8jA5p9eucn4 FKeF5HxgxgOMTMiNDm1nTV04/00s4d/jsGQXWMYbCUxleo4biT9rSo3dIBz8RER4JHga akLwniPvmoO4v0r7EqNwun+wHsvz4y0z6XEDlp66QkCFClr+0876OlAB2gDtVN+Ve1D7 vTHA/kwd/3CoIm8Ga7YCDf4fniVEJSxjKLOBZYoUSXtL1l93xcj51yXSVGOD7puhlHna I6tmrqAA0Fq8G7BquI4vEevjiLThIGdMvbsiwASEDJDikCf/5U46R/HsdZ5tyROj7Ckv blOw== 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 :arc-authentication-results; bh=6GSlwpUSYmw7fzmUuMGUY/SCaL/eltlOpuG8qj8FYGE=; b=smcNkH1QTOjoKxsYtOu53FfXGk9ZTBnGaND0NAlH0NRsTV8oMEZEO78+fXsVghRrSC j9dNfSpJhy8POY1UHqpnk9Jr3K8qmTprrCbNUGDTxD7CddLgP7HNaQ9rLBSCXWrg9Afn ZtmplUlQGpXuzYeygRimuEIczl3JvJJ7nePL71Pm41ETgWP1zU9l46wRzbxJJ63mDj7V oQJEVKnTp+quWXtW2uwBNl2tRAySmPErOlxgvo1+aFrpypWl6i+lkYyT6A77fuGzPr6b 5/jD/p8Vmc2NhWYjFQYQCLgwHt/iCHhTffOxzRXFqFbHa1jh5x41BVtsctI3IfnpgoEE Hc4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XSqC1GdH; 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 l4-v6si3715475plk.390.2018.01.26.04.17.14; Fri, 26 Jan 2018 04:17:28 -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=XSqC1GdH; 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 S1751901AbeAZMQT (ORCPT + 99 others); Fri, 26 Jan 2018 07:16:19 -0500 Received: from mail-wr0-f194.google.com ([209.85.128.194]:33920 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751546AbeAZMQR (ORCPT ); Fri, 26 Jan 2018 07:16:17 -0500 Received: by mail-wr0-f194.google.com with SMTP id 36so368109wrh.1 for ; Fri, 26 Jan 2018 04:16:16 -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:content-transfer-encoding:in-reply-to :user-agent; bh=6GSlwpUSYmw7fzmUuMGUY/SCaL/eltlOpuG8qj8FYGE=; b=XSqC1GdHMVe1+ktXkt65wpeVf27KanexD6Dxwe8rh71/iOqyI787JnJVoJkatwWJ7h Wy2g6aPuj/tEx4NX0sf++WywNjQWBOk3r2Qh+XZq3v2I5SSAj/yoEyAGpRy5tvlnk6LI AGvSIGIIdgMt4C4nPBTiMEVJ39k6SsQgtqYYw= 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=6GSlwpUSYmw7fzmUuMGUY/SCaL/eltlOpuG8qj8FYGE=; b=pwTkVn3DqV1hH0Io2c07XDlMB7YtYDi/6Wtt0oEs6k/1FEbzIsq2F+Zr9j1GnsSikg /mJyboKO1h1bbpMyXcTPclwe+YHxtJtXhWnPPaIr3E0u7OTiZKYKca0ORKG0w0D8YQsV u7Una30GzUDNnsaLRjheVbIm+gQKAUmP7ed84Apa9n6w/89qz9RqBxgTt+11Dn2M9GsI 2bOt8N7Foug/huoRKNif2ZYV+NdERsEQAjN685Ln+WKQ42d2efDuIXqozmCwUJSlxDT9 FVNAowc99dHYxnMe/x0ZbZm+ukb1gTBx2taX9QinpYDfhd3EftmhtV5czr+mnUFHBPDS ZDOg== X-Gm-Message-State: AKwxytczSUHV8kTiEemSr+zdQimeP7K8mAactGCwQCV44N2qC4CCx+Kx Ork/rzMzHW7o5Qkh5JfH/l2V6g== X-Received: by 10.223.156.145 with SMTP id d17mr12234660wre.61.1516968975630; Fri, 26 Jan 2018 04:16:15 -0800 (PST) Received: from oak.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id f13sm6869135wre.84.2018.01.26.04.16.10 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jan 2018 04:16:14 -0800 (PST) Date: Fri, 26 Jan 2018 12:16:09 +0000 From: Daniel Thompson To: Daniel Lezcano Cc: edubezval@gmail.com, kevin.wangtao@linaro.org, leo.yan@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, viresh.kumar@linaro.org, linux-kernel@vger.kernel.org, Zhang Rui , "open list:THERMAL" Subject: Re: [PATCH 4/8] thermal/drivers/Kconfig: Convert the CPU cooling device to a choice Message-ID: <20180126121609.qfahclcdamii7a27@oak.lan> References: <1516721671-16360-1-git-send-email-daniel.lezcano@linaro.org> <1516721671-16360-5-git-send-email-daniel.lezcano@linaro.org> <20180124163441.7sqq7qny66d6sqrz@oak.lan> <02e80d2c-3672-f7e2-dfb2-aed3efc84759@linaro.org> <20180125105715.sae3nwvz7u32v4va@oak.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 25, 2018 at 02:36:12PM +0100, Daniel Lezcano wrote: > On 25/01/2018 11:57, Daniel Thompson wrote: > > On Wed, Jan 24, 2018 at 05:59:09PM +0100, Daniel Lezcano wrote: > >> On 24/01/2018 17:34, Daniel Thompson wrote: > >> However, we are talking about distros here but the CPU cooling mechanism > >> is for mobile and in this case the kernel (usually Android based) comes > >> with a specific configuration file and this is where the SoC vendor has > >> to choose the right strategy. > > > > I agree its hard to conceive of a modern Android device that doesn't implement > > both the needed features but the performance figures in the covering > > letter come from Hikey (and they look pretty good) and Hikey is > > supported by a good number of regular Linux distros now. > > > > Using Kconfig to force what should be runtime decisions to happen at > > compile time means that Hikey becomes an example of a platform that > > is unable to run at max performance on the distros that have added > > support for it. > > I disagree. The ARM64's defconfig is not distro ready. We have always to > change the default option and fix things in the Kconfig to make the > hikey to work (eg. the missing hi655x clock config), without speaking > about the hikey960 which is not yet ready for full support. > > Hence, tweaking the Kconfig to choose the better strategy is not > necessarily a problem for this first iteration of code. The problem is not about tweaking config for a distro. No distro I know defconfig kernels. Tweaking is normal and expected. The problem is that a distro cannot generate a config that performs optimally on all devices that it supports because enabling one form of CPU cooling prevents other forms from being selected. There is no correct value for us to select if we don't know in advance what board the kernel image will be loaded on. Given the massive work that has gone on (especially in ARM ecosystem) to allow one kernel binary to support many boards at once it surprises me to see new features proposed that cannot be exploited without recompiling the kernel from platform to platform. > Note I'm not against changing the code to make it runtime selectable but > that will need a major rework of the current CPU cooling code especially > handling the change while the thermal framework is doing the mitigation > (and probably also changes of the thermal framework). Perhaps I should have distinguished more between runtime-meaning-boot-time and runtime-meaning-full-system-operation. To be clear none of my comments are about being able to enable/disable idle injection on a fully running system. It is the impact on multi-platform binaries that attracted my attention. > I prefer to keep simple self-encapsulated feature code and make it > evolve to something better instead of sending a blowing patch series > taking into account all possible combinations. Choosing the strategy at > compile time may be look restrictive but we can live with that without > problem and iteratively do the change until the choice becomes the > default strategy selection option. You won't find me arguing against iterative improvement. However I did observe that the idle injection code consists almost exclusively of new lines of code. Thus I don't understand why this new code interferes with cpufreq cooling to the point that the existing cooling options must compiled out of the kernel before we can exploit it. I can see the combo code does have tentacles in more places but even so I have the same question. What prevents the existing cooling strategy from being compiled at the same time. You appear to be saying that there's not yet enough infrastructure to decide which type of cooler to instantiate[1] so its OK to hack around the decision by forcing it to be made it at compile time. Even if we want to force a decision by some means, is compile time really the best point to do that? Daniel. [1] Is that because the DT isn't rich enough for us to figure out the trade off between using real OPPs and virtual idle-injected ones nor whether cpuidle entry/exit is fast enough for cooling to be effective? > > > > > > > Linaro.org │ Open source software for ARM SoCs > > Follow Linaro: Facebook | > Twitter | > Blog >