Received: by 10.213.65.68 with SMTP id h4csp498306imn; Tue, 27 Mar 2018 03:34:18 -0700 (PDT) X-Google-Smtp-Source: AIpwx49YOT2MqTC9ZEGbbHxlkcMauU6LYqbZtyPQevLJRecTQcJtyTtIk+Epakekxz2BgIdlmCf5 X-Received: by 2002:a17:902:8492:: with SMTP id c18-v6mr11708949plo.40.1522146858170; Tue, 27 Mar 2018 03:34:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522146858; cv=none; d=google.com; s=arc-20160816; b=TOnWt1d+7lZqLUEYMA18hjQ02H5r36AF5rro3lGp5yg/LCUOoZlPMzBTH00/Nhh+xp 6GFsegIaRZQ0PVA5q7/ycahh7MUE97SUmFGXesaXmhfKvHAG3YCePPuYGIGdsObHquzF j+jT0Hzk8HsdebMJFBcwI7W43fR05ama887K2JJ/uOgpQHICiz2MiD3+23PMKy27o7OO 6KTW2f4XLbC7bUj4Jf92tzfWRqqOBUPSzv72adEwpEoDyntc3Xgtp9eH8Bo79ugf9lrk MN6Jphe5P2xDp0NZpPNyjlOzEvdyllYFK7bc5YYNgw7BcUJ7tkEw6A7Ei+fNXtPIm8sP CQ0w== 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=KqGdzdoR53jb+dU/TgiEFXXBKe4q5E1gvj3bOwzncb4=; b=UJEjrXZ4VGcAhwuR2KyN0189kAY2f+vUa8zEqWK8LqIH9vF3QShzXpMothnVg8KM+n X3VOAlUYrHeU1jCF5ae4jARcgh6cGQQ5XEnzyq9bW26aaxteUT9m4BTgSY/NbPlNBfCs A+t/Q8b/0xUZ7yX3TeROCAowbuHnL5kLUmLYPuN49apPdusFQ7G9AvlhdNr85dlicaos eOiV8wbP3+xFe5o+UIweM/9a7HZ5EhA0C+xwBiD9SewY6kAYjPJQIEEHA5lP5QkjcfUD f3ytNy9GoP/SI2HkcIoOe21L8Bt6oHAAGAyTAsH2lfm6GgdvPY7lEEyVih8rkv603A/J xTmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gFTTXAY6; 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 e3si692513pgu.36.2018.03.27.03.34.03; Tue, 27 Mar 2018 03:34:18 -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=@linaro.org header.s=google header.b=gFTTXAY6; 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 S1752489AbeC0K1E (ORCPT + 99 others); Tue, 27 Mar 2018 06:27:04 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:35352 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751907AbeC0K1C (ORCPT ); Tue, 27 Mar 2018 06:27:02 -0400 Received: by mail-wm0-f54.google.com with SMTP id r82so20813667wme.0 for ; Tue, 27 Mar 2018 03:27:01 -0700 (PDT) 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=KqGdzdoR53jb+dU/TgiEFXXBKe4q5E1gvj3bOwzncb4=; b=gFTTXAY6d8qzrD4FDbMpLTE9WoMSTbYqVXfrVXbr/+q6cr825J10ffH0mOusTgwOlk drqE+wxaMnS5cAZkJXdP9cedFep+cO6qRLi75RFEU2n6QHk/t2MliK/jW7H+MUnghiZi k0etqBQeZfXEnWmYVS29FjztZxXlPO9PMIxPU= 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=KqGdzdoR53jb+dU/TgiEFXXBKe4q5E1gvj3bOwzncb4=; b=HdfO/4aNmzly7mFay3i+61IWNGVrSsz+lNRSgw45UKts+FR1cSIBtHv3nirGUy4joh 4lWYkvuOYkPJWrsOFMUby/x8im8bRWg1s2isPQGEbpNSkbPepkkduNkxMgVrMTauM5FY 91bgoVP68nLsfdDL016dfpS6EG+Z9D6NM84nwk0jFP20uhHX2rIiRUYDJTrYQaXLf0Kg mzo8AlSkKFHTnnpH7By9r9fhqKrzqJO6DbH+FmsW++kJ0OtJTE8VbZ6UYMBl7lupVH4A Jl4uWA4leLx0myUTp68ItE/AfCdyL6SfBVUPn05Q2/wRUWknftu5jKkkGi9gFNc2bRpk kpTA== X-Gm-Message-State: AElRT7EqVql/Nn7U0pjIZNykytVBLpBmrfYzR/uWh9vC/kqdHjP0YV5V /ID/OtYXt9NCFWqrE+xrMmItSw== X-Received: by 10.80.212.134 with SMTP id s6mr36526957edi.268.1522146420828; Tue, 27 Mar 2018 03:27:00 -0700 (PDT) Received: from ?IPv6:2001:41d0:fe90:b800:b0a9:da92:8c72:d9e2? ([2001:41d0:fe90:b800:b0a9:da92:8c72:d9e2]) by smtp.googlemail.com with ESMTPSA id r6sm722921edi.21.2018.03.27.03.26.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Mar 2018 03:27:00 -0700 (PDT) Subject: Re: [PATCH V2 6/7] thermal/drivers/cpu_cooling: Introduce the cpu idle cooling driver To: Leo Yan Cc: 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 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> From: Daniel Lezcano Message-ID: <8ee2cb0d-9afe-6626-0911-90ff6660bf8a@linaro.org> Date: Tue, 27 Mar 2018 12:26:58 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180327020331.GA21693@leoy-ThinkPad-X240s> 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 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. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog