Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7715062imu; Tue, 22 Jan 2019 10:19:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN7XJ4O8ZgxW+gYe0hpS3+3lcWxgxlvToMCgXJnWJ0bMndlr7wxasQpOYf2JC0vM8UkTMJxs X-Received: by 2002:a63:5207:: with SMTP id g7mr33334778pgb.253.1548181189018; Tue, 22 Jan 2019 10:19:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548181188; cv=none; d=google.com; s=arc-20160816; b=plAMdv9fSw/drJKOjT8WbQa288umqCumLmhGTtxuVccPFZsUEVWwIVsM/pidp0bVQJ 9yHX9VJfv6FmXtK5VRD6AAftSgCvkhinbKHAwWnERvSjHa8wJ08K+Zr6LThp3r6qal6k n7q2+W93DGdPWKTwARRctXPqReV8H7Lyi9uU91myKVpdjSV9lO5sk+rrbbfbA72oA2vK LdBrX0ThhLZldB4T3ryueQqeJht+mS3DTES37EtTkVIH2l1ERyBTIT/kOsEY6zWk3Jv9 rPb5ql9FEDrmtlmeZIh20s35T50bJz+QsRyAiNRxAGpEqIHnD9hj7/A392b963YsvEFI Pkwg== 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=NVx6E9EXWd7voBS4o/usru2EgOg1o16DwxkCr2d+GAw=; b=XrIYX8A6KxGAyH9x+0VDEhz0BOtGsDLrkntKvK/EllU/i2l3l4hR3CQTreCZM/RYCJ CXfQjZVZOESCv/p40gPqAw63DbfNXqdXMA/hWL/A2zKZnzn9M2VHfvSS0I7+rp/R6b/b hbQ6qvzXNgsLzUv6OxkYPEW5TkPDuKtwwf76oD/vpEql9es8wCJHTlvj/NDoBDx4EQhI +wJ/mqdBbLTLudM3nlVvYnZYKoVNSEFGORDwcYHl+58S0uIaz7hnYEtH/pI9NreCH5P1 K6GMgbPDdJgNbD5fcE0UEtaT3a/CFWZkqIarlsoPk6y4XBF/4TUeDLrFxZ5suTDHK/Yv EUkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=XftQEVf2; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d4si16145808pls.348.2019.01.22.10.19.29; Tue, 22 Jan 2019 10:19:48 -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=@chromium.org header.s=google header.b=XftQEVf2; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726853AbfAVSSZ (ORCPT + 99 others); Tue, 22 Jan 2019 13:18:25 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40525 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726157AbfAVSSY (ORCPT ); Tue, 22 Jan 2019 13:18:24 -0500 Received: by mail-pl1-f193.google.com with SMTP id u18so11868217plq.7 for ; Tue, 22 Jan 2019 10:18:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.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=NVx6E9EXWd7voBS4o/usru2EgOg1o16DwxkCr2d+GAw=; b=XftQEVf22uyXP6E7ZlchEh/RXGd2VYFTCVP8MnCCRPHvCGW38ZGjktEwHBWkdegqNA bLfGvNc4qVzgCbJ053fjlDCVRfYpwPk2zlhx/9tpI5GEbnoZ99pG2ie1hVwA9+MMEpH3 HCi6jabLU0PV2Y02XtFkfzMp6r9U8LfJnSW7E= 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=NVx6E9EXWd7voBS4o/usru2EgOg1o16DwxkCr2d+GAw=; b=mI84uWJ85o9DGCwoVEJDLqksmRThvM/ZD6kVAy9fY0Nqt70QFvMqQPugcLAKRvpP9h kvC2O+5hMJdfKRF79y/EIPqqKfai2Q8VVb6up9vawcL/hmpdA78AjNdImtE5U20SqXZW JXPGi9qAp0OG5GEUBVVys9CzABA0yiexxCn2EstD9s3J5nhI1D/xAdwjBbO/QKold64E 2UT9OtZBbNMQ0xHaiZ/RW+H/gYb//09Mnh5ZKNHJwyFO0QQOm11Y9qmESpMiMGc20K3A mMVwvVtSpx3Nvjk9xOSMhZRdSlL3dN1RDLVLV+BJnPXkkUKCnkpz5lGv4w6fsaO43b8t G6cw== X-Gm-Message-State: AJcUukd39Y09rfU5sNRtZOtjfLSatSHIyui1OiGkWdYr0bgNAfcopN1O PeN5UPunoyfsVH2ig5RkE8HRng== X-Received: by 2002:a17:902:f20b:: with SMTP id gn11mr33999379plb.274.1548181103636; Tue, 22 Jan 2019 10:18:23 -0800 (PST) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id w185sm23627174pfb.135.2019.01.22.10.18.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 22 Jan 2019 10:18:22 -0800 (PST) Date: Tue, 22 Jan 2019 10:18:22 -0800 From: Matthias Kaehlcke To: Amit Kucheria Cc: LKML , linux-arm-msm , Bjorn Andersson , Viresh Kumar , Eduardo Valentin , Andy Gross , Taniya Das , Stephen Boyd , Douglas Anderson , David Brown , Rob Herring , Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Subject: Re: [PATCH v2 8/9] arm64: dts: sdm845: wireup the thermal trip points to cpufreq Message-ID: <20190122181822.GF261387@google.com> References: <7f94696460848a6bcfe5aee5ffda7fe556240736.1547458732.git.amit.kucheria@linaro.org> <20190114220101.GN261387@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 21, 2019 at 11:40:45PM +0530, Amit Kucheria wrote: > On Tue, Jan 15, 2019 at 3:31 AM Matthias Kaehlcke wrote: > > > > On Mon, Jan 14, 2019 at 03:51:10PM +0530, Amit Kucheria wrote: > > > Since all cpus in the big and little clusters, respectively, are in the > > > same frequency domain, use all of them for mitigation in the > > > cooling-map. We end up with two cooling devices - one each for the big > > > and little clusters. > > > > > > At the lower trip points we restrict ourselves to throttling only a few > > > OPPs. At higher trip temperatures, allow ourselves to be throttled to > > > any extent. > > > > > > Signed-off-by: Amit Kucheria > > > --- > > > arch/arm64/boot/dts/qcom/sdm845.dtsi | 177 ++++++++++++++++++++++++--- > > > 1 file changed, 161 insertions(+), 16 deletions(-) > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi > > > index fb7da678b116..7973e88bdf94 100644 > > > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi > > > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi > > > > > > ... > > > > > > @@ -1719,18 +1728,35 @@ > > > thermal-sensors = <&tsens0 1>; > > > > > > trips { > > > - cpu_alert0: trip0 { > > > + cpu0_alert0: trip-point@0 { > > > > Thanks for adapting the trip point names and labels in anticipation of > > further additions! > > > > Seems you aren't overly convinced about the 'target/threshold' > > terminology used by some other arm64 platforms ;-) > > target and threshold have an air of finality to them and doesn't lend > itself to having a few trip points on the way to the critical trip, > IMO. > > Let me know if you feel otherwise. I can see your point, and it's also true that target/threshold seem to imply the use of power_allocator, which may not always be the case. > > > temperature = <95000>; > > > hysteresis = <2000>; > > > type = "passive"; > > > }; > > > > I realized that we still have the potential problem of a name change > > in the trip point node name if a 'threshold' node for IPA is added, > > since this node will have a lower temperature than 95°. If this is > > something to be concerned about it might be worth to add that extra > > trip point already to avoid headaches or funky trip point enumeration, > > even if we know that the value might not be the final one. > > I will squash both the DT changes in to a single change introducing 2 > passive trips and 1 critical trip to avoid the churn. Sounds good, thanks! > See if you like it better. I didn't really dislike it, was just wondering if renaming nodes could break existing users. I imagine it's not a huge problem after all, since users with an older kernel version won't see the DT change and probably should use the phandle anyway. > > (I'm aware that we are also changing the node names and labels right > > now, it seems less problematic at this point since the SDM845 thermal > > zones are a fairly recent addition) > > > > > - cpu_crit0: trip1 { > > > + cpu0_crit: cpu_crit@0 { > > > > nit: does the @0 add any value here? IIUC there can be only one > > critical trip point, hence there will never be a cpu_crit@1 or > > higher. > > Agreed. Will remove. > > > > temperature = <110000>; > > > hysteresis = <1000>; > > > type = "critical"; > > > }; > > > }; > > > + > > > + cooling-maps { > > > + map0 { > > > + trip = <&cpu0_alert0>; > > > + cooling-device = <&CPU0 THERMAL_NO_LIMIT 4>, > > > + <&CPU1 THERMAL_NO_LIMIT 4>, > > > + <&CPU2 THERMAL_NO_LIMIT 4>, > > > + <&CPU3 THERMAL_NO_LIMIT 4>; > > > + }; > > > > Out of curiosity: how did you determing the max cooling state of 4? > > Just some basic testing by pinning a dhrystone benchmark to each of > the cores along with some stress-ng threads. Lopping off the top 4 > OPPs seemed to mitigate anything I could throw at the board. Thanks for sharing your approach! > I'm unable to do the "device in a closed car on a hot summer day" type > of tests on the dev board. Nevertheless, I've changed the patch now to > only remove the boost frequency at 75 degrees and then full throttling > at 95 degrees. > > I'd appreciate more "real world" testing to validate these. Sure, we'll run some tests with the new configuration on our site. Thanks Matthias