Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2426060ybh; Mon, 5 Aug 2019 00:44:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaM7xBlnTKcKefuZmYd5W8qr7Dh8g18/cl90gtK+wKO+NbRv/OGI9W4vwmW0mbaSQJCYMG X-Received: by 2002:a17:90a:3590:: with SMTP id r16mr16983268pjb.44.1564991040213; Mon, 05 Aug 2019 00:44:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564991040; cv=none; d=google.com; s=arc-20160816; b=sq6xnO+Xqp4kJ7haVAjZ0lr/y47ioMdRAAgf0rE/99rFcH0Wj2TA26gX94qa6C5o0l reXWtXuQOpM12+61I/dk4R4WDdxvOaIUuaO+NCen/9qW+UiVl2B8+6Tgssbtn/h8xo88 mteo+RvEeIzutEkIkvO98IX9ePYZxcBDZ+y4/284kK2ruFZnr9YwIInrPE9eViySXok+ 2X6ZHCv05YMcbI6MXvQkBL5w2WI/dITS0+Cxb/nHBB4Ie+UZP9x/Xoi3ox18ZQ+USmPh ffwOlpyLuW8mU0AWtCcknC4LPVBmIyhpS24y19qLueO1J0K5Tg4PtroWEK2fQiQOPM9Z yDsA== 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:user-agent:date:message-id:autocrypt :openpgp:from:references:cc:to:subject; bh=YcGGTZo+jgceH9CV0gIm+esuuVMspucyqwPpy9PjVeE=; b=h/1NFECINHxl1xX7Y1PqIZSJFO+DnlZ1KtJV10nD5WcKbA2SkwA19hhEScqAXJBlmn qjpJQ1Tdm77oWBhBeGc2XRR6VHMbp0iB/ik6K8DINocCz+QMbgAwFybINmfREbXQTx6B 2Avf2oVbSGOOkQDCmVsAkDfhidzr73cQM4xlNDmYlRxVzfYjSI8mFZsVwMK5oQx34tEX asnnyEYf6YCP00RX1Tkk09em6EtpoviYUjoDe0nn4ABk5HI9oGOjC0lx4vmi09ZZGAzp hpgtXVoT6b6PwuBBdBU6mA0Glrl7Kw+ka6G44t4ps4ODomYRLsue+6pIbYNUznI7N+Jy 1Tmg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1si21522064plz.351.2019.08.05.00.43.44; Mon, 05 Aug 2019 00:44:00 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727256AbfHEHmo (ORCPT + 99 others); Mon, 5 Aug 2019 03:42:44 -0400 Received: from comms.puri.sm ([159.203.221.185]:49670 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726394AbfHEHmo (ORCPT ); Mon, 5 Aug 2019 03:42:44 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id AD8D8DF6EA; Mon, 5 Aug 2019 00:42:42 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00cR1ykuyMYJ; Mon, 5 Aug 2019 00:42:41 -0700 (PDT) Subject: Re: [PATCH v3 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver To: Daniel Lezcano , viresh.kumar@linaro.org, kevin.wangtao@linaro.org, leo.yan@linaro.org, edubezval@gmail.com, vincent.guittot@linaro.org, javi.merino@kernel.org, rui.zhang@intel.com, daniel.thompson@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <1522945005-7165-7-git-send-email-daniel.lezcano@linaro.org> <20190805051111.24318-1-martin.kepplinger@puri.sm> <02ec23c3-37ee-4e9f-56a4-453a30a29747@puri.sm> <421c43a9-c721-05eb-1860-dfb5c042bc95@linaro.org> From: Martin Kepplinger Openpgp: preference=signencrypt Autocrypt: addr=martin.kepplinger@puri.sm; keydata= mQINBFULfZABEADRxJqDOYAHfrp1w8Egcv88qoru37k1x0Ugy8S6qYtKLAAt7boZW+q5gPv3 Sj2KjfkWA7gotXpASN21OIfE/puKGwhDLAySY1DGNMQ0gIVakUO0ji5GJPjeB9JlmN5hbA87 Si9k3yKQQfv7Cf9Lr1iZaV4A4yjLP/JQMImaCVdC5KyqJ98Luwci1GbsLIGX3EEjfg1+MceO dnJTKZpBAKd1J7S2Ib3dRwvALdiD7zqMGqkw5xrtwasatS7pc6o/BFgA9GxbeIzKmvW/hc3Q amS/sB12BojyzdUJ3TnIoAqvwKTGcv5VYo2Z+3FV+/MJVXPo8cj2vmfxQx1WG4n6X0pK4X8A BkCKw2N/evMZblNqAzzGVtoJvqQYkzQ20Fm+d3wFl6lS1db4MB+kU13G8kEIE22Q3i6kx4NA N49FLlPeDabGfJUyDaZp5pmKdcd7/FIGH/HjShjx7g+LKSwWNMkDygr4WARAP4h8zYDZuNqe ofPvMLqJxHeexBPIGF/+OwMyTvM7otP5ODuFmq6OqjNPf1irJmkiFv3yEa+Ip0vZzwl4XvrZ U0IKjSy2rbRLg22NsJT0XVZJbutIXYSvIHGqSxzzfiOOLnRjR++fbeEoVlRJ4NZHDKCh3pJv LNd+j03jXr4Rm058YLgO7164yr7FhMZniBJw6z648rk8/8gGPQARAQABtC1NYXJ0aW4gS2Vw cGxpbmdlciA8bWFydGluLmtlcHBsaW5nZXJAcHVyaS5zbT6JAk4EEwE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0lH5qZfd2oG7 WSta+S2sXiLRTo/jtoVhSzQ3pyUZQWMF8JSQoh8TPztu94WWT6D/C+aeeLl4WkuRCbldl84G 4t1RG8Nxma/hJwwu1zRNsFK55Q/8Nlukc1WI1U+iF+EmpjZVfjFl9P9X2ArrX6mZfOgUipiY 5VqX5Dys8s44RkFWa02WJygLuO9YUb/P+g8eSbmSYAwp2Gpzcdww63kTLv56uk32jnpDLcYD WG//KA68tPVBR2xhy7Fp+qAa Message-ID: <172fc66f-a385-1d58-91f1-60224fac348b@puri.sm> Date: Mon, 5 Aug 2019 09:42:38 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 In-Reply-To: <421c43a9-c721-05eb-1860-dfb5c042bc95@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05.08.19 09:39, Daniel Lezcano wrote: > On 05/08/2019 08:53, Martin Kepplinger wrote: > > [ ... ] > >>>> +static s64 cpuidle_cooling_runtime(struct cpuidle_cooling_device *idle_cdev) >>>> +{ >>>> + s64 next_wakeup; >>>> + unsigned long state = idle_cdev->state; >>>> + >>>> + /* >>>> + * The function should not be called when there is no >>>> + * mitigation because: >>>> + * - that does not make sense >>>> + * - we end up with a division by zero >>>> + */ >>>> + if (!state) >>>> + return 0; >>>> + >>>> + next_wakeup = (s64)((idle_cdev->idle_cycle * 100) / state) - >>>> + idle_cdev->idle_cycle; >>>> + >>>> + return next_wakeup * NSEC_PER_USEC; >>>> +} >>>> + >>> >>> There is a bug in your calculation formula here when "state" becomes 100. >>> You return 0 for the injection rate, which is the same as "rate" being 0, >>> which is dangerous. You stop cooling when it's most necessary :) >>> >>> I'm not sure how much sense really being 100% idle makes, so I, when testing >>> this, just say if (state == 100) { state = 99 }. Anyways, just don't return 0. >>> >> >> oh and also, this breaks S3 suspend: > > What breaks the S3 suspend? The idle cooling device or the bug above ? The idle cooling device. I have to configure it out: remove CONFIG_CPU_IDLE_THERMAL to test suspend/resume again. Errors in the kernel log, see below. > >> Aug 5 06:09:20 pureos kernel: [ 807.487887] PM: suspend entry (deep) >> Aug 5 06:09:40 pureos kernel: [ 807.501148] Filesystems sync: 0.013 >> seconds >> Aug 5 06:09:40 pureos kernel: [ 807.501591] Freezing user space >> processes ... (elapsed 0.003 seconds) done. >> Aug 5 06:09:40 pureos kernel: [ 807.504741] OOM killer disabled. >> Aug 5 06:09:40 pureos kernel: [ 807.504744] Freezing remaining >> freezable tasks ... >> Aug 5 06:09:40 pureos kernel: [ 827.517712] Freezing of tasks failed >> after 20.002 seconds (4 tasks refusing to freeze, wq_busy=0): >> Aug 5 06:09:40 pureos kernel: [ 827.527122] thermal-idle/0 S 0 >> 161 2 0x00000028 >> Aug 5 06:09:40 pureos kernel: [ 827.527131] Call trace: >> Aug 5 06:09:40 pureos kernel: [ 827.527148] __switch_to+0xb4/0x200 >> Aug 5 06:09:40 pureos kernel: [ 827.527156] __schedule+0x1e0/0x488 >> Aug 5 06:09:40 pureos kernel: [ 827.527162] schedule+0x38/0xc8 >> Aug 5 06:09:40 pureos kernel: [ 827.527169] smpboot_thread_fn+0x250/0x2a8 >> Aug 5 06:09:40 pureos kernel: [ 827.527176] kthread+0xf4/0x120 >> Aug 5 06:09:40 pureos kernel: [ 827.527182] ret_from_fork+0x10/0x18 >> Aug 5 06:09:40 pureos kernel: [ 827.527186] thermal-idle/1 S 0 >> 162 2 0x00000028 >> Aug 5 06:09:40 pureos kernel: [ 827.527192] Call trace: >> Aug 5 06:09:40 pureos kernel: [ 827.527197] __switch_to+0x188/0x200 >> Aug 5 06:09:40 pureos kernel: [ 827.527203] __schedule+0x1e0/0x488 >> Aug 5 06:09:40 pureos kernel: [ 827.527208] schedule+0x38/0xc8 >> Aug 5 06:09:40 pureos kernel: [ 827.527213] smpboot_thread_fn+0x250/0x2a8 >> Aug 5 06:09:40 pureos kernel: [ 827.527218] kthread+0xf4/0x120 >> Aug 5 06:09:40 pureos kernel: [ 827.527222] ret_from_fork+0x10/0x18 >> Aug 5 06:09:40 pureos kernel: [ 827.527226] thermal-idle/2 S 0 >> 163 2 0x00000028 >> Aug 5 06:09:40 pureos kernel: [ 827.527231] Call trace: >> Aug 5 06:09:40 pureos kernel: [ 827.527237] __switch_to+0xb4/0x200 >> Aug 5 06:09:40 pureos kernel: [ 827.527242] __schedule+0x1e0/0x488 >> Aug 5 06:09:40 pureos kernel: [ 827.527247] schedule+0x38/0xc8 >> Aug 5 06:09:40 pureos kernel: [ 827.527259] smpboot_thread_fn+0x250/0x2a8 >> Aug 5 06:09:40 pureos kernel: [ 827.527264] kthread+0xf4/0x120 >> Aug 5 06:09:40 pureos kernel: [ 827.527268] ret_from_fork+0x10/0x18 >> Aug 5 06:09:40 pureos kernel: [ 827.527272] thermal-idle/3 S 0 >> 164 2 0x00000028 >> Aug 5 06:09:40 pureos kernel: [ 827.527278] Call trace: >> Aug 5 06:09:40 pureos kernel: [ 827.527283] __switch_to+0xb4/0x200 >> Aug 5 06:09:40 pureos kernel: [ 827.527288] __schedule+0x1e0/0x488 >> Aug 5 06:09:40 pureos kernel: [ 827.527293] schedule+0x38/0xc8 >> Aug 5 06:09:40 pureos kernel: [ 827.527298] smpboot_thread_fn+0x250/0x2a8 >> Aug 5 06:09:40 pureos kernel: [ 827.527303] kthread+0xf4/0x120 >> Aug 5 06:09:40 pureos kernel: [ 827.527308] ret_from_fork+0x10/0x18 >> Aug 5 06:09:40 pureos kernel: [ 827.527375] Restarting kernel threads >> ... done. >> Aug 5 06:09:40 pureos kernel: [ 827.527771] OOM killer enabled. >> Aug 5 06:09:40 pureos kernel: [ 827.527772] Restarting tasks ... done. >> Aug 5 06:09:40 pureos kernel: [ 827.528926] PM: suspend exit >> >> >> do you know where things might go wrong here? >> >> thanks, >> >> martin >> > >