Received: by 10.213.65.68 with SMTP id h4csp599973imn; Tue, 27 Mar 2018 05:30:28 -0700 (PDT) X-Google-Smtp-Source: AG47ELs02qNr15vXfgp6Pl6IbLn3Iy+KMdeZmKxHxA+OGccBfoFIlaD+wD5pxLeQx01Y07JlDB10 X-Received: by 10.99.107.9 with SMTP id g9mr31066663pgc.3.1522153828134; Tue, 27 Mar 2018 05:30:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522153828; cv=none; d=google.com; s=arc-20160816; b=aO+CkPCmlWJvROYV44+Oktd7zxa6hd0OmItkHcEVg43H4f7iB0EiI3s2qUjOyzG7lm rTTU9EUYJQL91/oMeALFld0sEEGDGJU4v/t1qoRhPlsE6F9cd0b7HBA/7ct7r9SdgqPt Zjg88at7bwFM+6TVVTIihTrYA/DvuJukPpNzHutdnAIB7KIkUoofXFSdX3H40Y8oKRo7 EcoTtuwpKtlQ6LLLXuccmzf3HFmVERbFr5rOdlnYGWy+Tqpkxd09eZgxvOzHuL4ArAS6 NkNdYS49pEZaAeZg7tojRfHc7F9Km1Pg0Ys1YuFKZNvNxijg1WNaHN6wNAwYTu7InPWS feIw== 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=CaxQ1g8SJo3BiW1lqvpWpM4db/4H/nznB2dW4NAJI8I=; b=YqQ3IiCLk0185gbXdblhcVa/FdT2fVP0iH3uiXyeR/0aBRa8np5+wdloCwEmZxoC4C 4H0lN1JctNwAAYLMrdqtnPRFgvbQxm8uu9reA0vA2P0B7EJr8AsdvwskYdlmb/MtLWhX LITubEEOJ8NwziITY52uqHKudVgM/S4oKkF1DQvA341A3lNiZJ6lc8em6JrdXBbQKncN W5vcyalT9lWguFzuYykIX0owr5PRbxwxR8xTzMH1rouOnhbkPzQ7PQ9KklchUlf+wwN1 EYvDI2iV2DrVb47EYczk5CXn9W/9XuubLiTPvwUURs+aPhC0qiM0SoVfmyupu24ARuIU LBcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vNG/4Ksi; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 33-v6si1187022pls.491.2018.03.27.05.30.13; Tue, 27 Mar 2018 05:30:28 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vNG/4Ksi; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbeC0M2o (ORCPT + 99 others); Tue, 27 Mar 2018 08:28:44 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:52588 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751092AbeC0M2m (ORCPT ); Tue, 27 Mar 2018 08:28:42 -0400 Received: by mail-wm0-f67.google.com with SMTP id l9so21349047wmh.2; Tue, 27 Mar 2018 05:28:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=CaxQ1g8SJo3BiW1lqvpWpM4db/4H/nznB2dW4NAJI8I=; b=vNG/4Ksixj2UCHqP8MroS9Ea1rlVAbIvpOpf9BqQ1k4v4CKclBjpgf3KHIcPnQSChZ PCUT6lD8i0o1tHztmxto9TmEpiYbBMmwoUh7ERB83INs0Rn2BBsdD7Z583u6WAAXVAei Vbhe5U8qXzCaJoD3+zFQ3R5hnqN/YVxvrdWSFBx1h9ou5ocF0camA9Xj7XNUHBwue8YV OGXDBut7Uu1tXjbcTbGJuTJljQtrqhbH6EEl713Uvx65EuOAfdjTTHL9uaVmq66PveUj TcofN365Q+ylKdUgckEasBc09uypHjcQqhGh+3rZ+uSgeDiG2PntRGS7EvR/i5i+Rnpu iC7g== 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=CaxQ1g8SJo3BiW1lqvpWpM4db/4H/nznB2dW4NAJI8I=; b=sgoEOy8y/RJ7RO8PNaNVnRoH42w6AM9Cv8p7EACxyNJxbJrgxO2KlMZyzQmb6Zgzbt g4YmTQcfI1UXY2lWMRQvZT2LgQx73gjE8FOYChv+799JlXk3RbVAOMy46M997kY3BZvW K3WwX6RIWlZi2cmniLi1l9GejHBoLg9Lcyk+6cbd3+aCaqbMHrYegPxKj9dI5i6z5pnW 02jJx5ZFVp0/tpCapSEXGgQ7h9tuqOzQBJGwf938kXIXOyDuQTJy4To8e93XxY1Ysbrm stt3oQc5u1nYdZ9yCa23Zoe7QB3Q6ZD/MCzVvIrSHBH47fW5BCQaRojflwHfZ5kiO1XF /5yQ== X-Gm-Message-State: AElRT7HrKVsfUiwPiCYbBUEZnc1VR4XRG7cvXLhkAKX0o9rneCZzGA2f jvljSK/HRnkD1oy0Sc1XYHc= X-Received: by 10.28.124.24 with SMTP id x24mr1665537wmc.6.1522153720897; Tue, 27 Mar 2018 05:28:40 -0700 (PDT) Received: from localhost.localdomain ([151.15.243.46]) by smtp.gmail.com with ESMTPSA id i11sm936091wre.42.2018.03.27.05.28.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 27 Mar 2018 05:28:38 -0700 (PDT) Date: Tue, 27 Mar 2018 14:28:36 +0200 From: Juri Lelli To: Daniel Lezcano Cc: Leo Yan , edubezval@gmail.com, kevin.wangtao@linaro.org, vincent.guittot@linaro.org, amit.kachhap@gmail.com, linux-kernel@vger.kernel.org, javi.merino@kernel.org, rui.zhang@intel.com, daniel.thompson@linaro.org, linux-pm@vger.kernel.org, Viresh Kumar Subject: Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver Message-ID: <20180327122836.GD10639@localhost.localdomain> References: <1519226968-19821-1-git-send-email-daniel.lezcano@linaro.org> <1519226968-19821-7-git-send-email-daniel.lezcano@linaro.org> <20180327020331.GA21693@leoy-ThinkPad-X240s> <8ee2cb0d-9afe-6626-0911-90ff6660bf8a@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ee2cb0d-9afe-6626-0911-90ff6660bf8a@linaro.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Daniel, On 27/03/18 12:26, Daniel Lezcano wrote: > On 27/03/2018 04:03, Leo Yan wrote: > > Hi Daniel, > > > > On Wed, Feb 21, 2018 at 04:29:27PM +0100, Daniel Lezcano wrote: > >> The cpu idle cooling driver performs synchronized idle injection across all > >> cpus belonging to the same cluster and offers a new method to cool down a SoC. > >> > >> Each cluster has its own idle cooling device, each core has its own idle > >> injection thread, each idle injection thread uses play_idle to enter idle. In > >> order to reach the deepest idle state, each cooling device has the idle > >> injection threads synchronized together. > >> > >> It has some similarity with the intel power clamp driver but it is actually > >> designed to work on the ARM architecture via the DT with a mathematical proof > >> with the power model which comes with the Documentation. > >> > >> The idle injection cycle is fixed while the running cycle is variable. That > >> allows to have control on the device reactivity for the user experience. At > >> the mitigation point the idle threads are unparked, they play idle the > >> specified amount of time and they schedule themselves. The last thread sets > >> the next idle injection deadline and when the timer expires it wakes up all > >> the threads which in turn play idle again. Meanwhile the running cycle is > >> changed by set_cur_state. When the mitigation ends, the threads are parked. > >> The algorithm is self adaptive, so there is no need to handle hotplugging. > > > > The idle injection threads are RT threads (FIFO) and I saw in > > play_idle() set/clear flag PF_IDLE for it. Will these idle injection > > threads utilization be accounted into RT utilization? > > > > If idle injection threads utilization is accounted as RT tasks > > utilization, will this impact CPUFreq governor 'schedutil' for OPP > > selection? > > Hi Leo, > > The idle injection task has a very low utilization when it is not in the > play_idle function, basically it wakes up, sets a timer and play_idle(). > > Regarding the use case, the idle injection is the base brick for an > combo cooling device with cpufreq + cpuidle. When the idle injection is > used alone, it is because there is no cpufreq driver for the platform. > If there is a cpufreq driver, then we should endup with the cpu cooling > device where we have control of the OPP (and there is no idle injection > threads) or the combo cooling device. > > Except I'm missing something, the idle injection threads won't impact > the OPP selection. Mmm, they actually might. schedutil selects max OPP as soon as it sees an RT thread. I fear these guys might generate unwanted spikes. Maybe you can filter them out? Best, - Juri