Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754724AbcKUORl (ORCPT ); Mon, 21 Nov 2016 09:17:41 -0500 Received: from merlin.infradead.org ([205.233.59.134]:51810 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754705AbcKUORh (ORCPT ); Mon, 21 Nov 2016 09:17:37 -0500 Date: Mon, 21 Nov 2016 15:17:28 +0100 From: Peter Zijlstra To: Juri Lelli Cc: Viresh Kumar , Rafael Wysocki , Ingo Molnar , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , Robin Randhawa , Steve Muckle , tkjos@google.com, Morten Rasmussen Subject: Re: [PATCH] cpufreq: schedutil: add up/down frequency transition rate limits Message-ID: <20161121141728.GF3092@twins.programming.kicks-ass.net> References: <20161121100805.GB10014@vireshk-i7> <20161121101946.GI3102@twins.programming.kicks-ass.net> <20161121121432.GK24383@e106622-lin> <20161121122622.GC3092@twins.programming.kicks-ass.net> <20161121135308.GN24383@e106622-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161121135308.GN24383@e106622-lin> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1359 Lines: 29 On Mon, Nov 21, 2016 at 01:53:08PM +0000, Juri Lelli wrote: > On 21/11/16 13:26, Peter Zijlstra wrote: > > So the limited decay would be the dominant factor in ramp-up time, > > leaving the regular PELT period the dominant factor for ramp-down. > > > > Hmmm, AFAIU the limited decay will help not forgetting completely the > contribution of tasks that sleep for a long time, but it won't modify > the actual ramp-up of the signal. So, for new tasks we will need to play > with a sensible initial value (trading off perf and power as usual). Oh, you mean ramp-up for bright spanking new tasks? I forgot the details, but I think we can fudge the 'history' such that those too ramp up quickly. > > (Note that the decay limit would only be applied on the per-task signal, > > not the accumulated signal.) > > > > Right, and since schedutil consumes the latter, we could still suffer > from too frequent frequency switch events I guess (this is where the > down threshold thing came as a quick and dirty fix). Maybe we can think > of some smoothing applied to the accumulated signal, or make it decay > slower (don't really know what this means in practice, though :) ? Not sure I follow. So by limiting decay to the task value, the moment we add it back to the accumulated signal (wakeup), the accumulated signal jumps up quickly and ramp-up is achieved.