From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 0/3] cpufreq: Replace timers with utilization update callbacks Date: Fri, 12 Feb 2016 15:04:15 +0100 Message-ID: <20160212140415.GS6357@twins.programming.kicks-ass.net> References: <3071836.JbNxX8hU6x@vostro.rjw.lan> <56B93548.9090006@linaro.org> <5387313.xAhVpzgZCg@vostro.rjw.lan> <56BA8C29.4090905@linaro.org> <20160211115959.GI6357@twins.programming.kicks-ass.net> <20160211122429.GM11415@e106622-lin> <20160211152625.GM6357@twins.programming.kicks-ass.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from casper.infradead.org ([85.118.1.10]:37462 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbcBLOEU (ORCPT ); Fri, 12 Feb 2016 09:04:20 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Vincent Guittot Cc: Juri Lelli , Steve Muckle , "Rafael J. Wysocki" , "Rafael J. Wysocki" , Linux PM list , Linux Kernel Mailing List , Srinivas Pandruvada , Viresh Kumar , Thomas Gleixner On Thu, Feb 11, 2016 at 07:23:55PM +0100, Vincent Guittot wrote: > I agree that using rt_avg is not the best choice to evaluate the > capacity that is used by RT tasks but it has the advantage of been > already there. Do you mean that we should use another way to compute > the capacity that is used by rt tasks to then select the frequency ? Nope, RR/FIFO simply do not contain enough information to compute anything from. > Or do you mean that we can't do anything else than asking for max > frequency ? Yep. > Trying to set max frequency just before scheduling RT task is not > really doable on a lot of platform because the sequence that changes > the frequency can sleep and takes more time than the run time of the > task. So what people do today is shoot cpufreq in the head and not use it, maybe that's the 'right' thing on these platforms. > At the end, we will have set max frequency once the task has > finished to run. There is no other solution than increasing the > min_freq of cpufreq to a level that will ensure enough compute > capacity for RT task with such high constraints that cpufreq can't > react. But you cannot a priori tell how much time RR/FIFO tasks will require, that's the entire problem with them. We can compute a hysterical average, but that _will_ mis predict the future and get you underruns/deadline misses. > For other RT tasks, we can probably found a way to set a > frequency that can fit both RT constraints and power consumption. You cannot, not without adding a lot more information about what these tasks are doing, and that is not captured in the task model.