Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933670AbdCURDH (ORCPT ); Tue, 21 Mar 2017 13:03:07 -0400 Received: from mail-ot0-f174.google.com ([74.125.82.174]:32913 "EHLO mail-ot0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933664AbdCURCM (ORCPT ); Tue, 21 Mar 2017 13:02:12 -0400 MIME-Version: 1.0 In-Reply-To: References: <4366682.tsferJN35u@aspire.rjw.lan> <2185243.flNrap3qq1@aspire.rjw.lan> <3300960.HE4b3sK4dn@aspire.rjw.lan> <20170321132253.vjp7f72qkubpttmf@hirez.programming.kicks-ass.net> <20170321140325.gf64gc7eaqu335t5@hirez.programming.kicks-ass.net> <20170321145808.GS3093@worktop> From: Vincent Guittot Date: Tue, 21 Mar 2017 18:01:50 +0100 Message-ID: Subject: Re: [RFC][PATCH v2 2/2] cpufreq: schedutil: Avoid decreasing frequency of busy CPUs To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Linux PM , LKML , Srinivas Pandruvada , Viresh Kumar , Juri Lelli , Patrick Bellasi , Joel Fernandes , Morten Rasmussen , Ingo Molnar Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1609 Lines: 39 On 21 March 2017 at 18:00, Vincent Guittot wrote: > On 21 March 2017 at 15:58, Peter Zijlstra wrote: >> >> On Tue, Mar 21, 2017 at 03:16:19PM +0100, Vincent Guittot wrote: >> > On 21 March 2017 at 15:03, Peter Zijlstra wrote: >> > >> > > On Tue, Mar 21, 2017 at 02:37:08PM +0100, Vincent Guittot wrote: >> > > > On 21 March 2017 at 14:22, Peter Zijlstra wrote: >> > > >> > > > For the not overloaded case, it makes sense to immediately update to >> > > > OPP to be aligned with the new utilization of the CPU even if it was >> > > > not idle in the past couple of ticks >> > > >> > > Yeah, but we cannot know. Also, who cares? >> > > >> > >> > embedded system that doesn't want to stay at higest OPP if significant part >> > of the utilzation has moved away as an example >> > AFAICT, schedutil tries to select the best OPP according to the current >> > utilization of the CPU so if the utilization decreases, the OPP should also >> > decrease >> >> Sure I get that; but given the lack of crystal ball instructions we >> cannot know if this is the case or not. > > cfs_rq->avg.load_avg account the waiting time of CPU (in addition to sorry i wanted to say the waiting time of tasks on the CPU > the weight of task) so i was wondering if we can't use it to detect if > we are in the overloaded case or not even if utilization is not mac > capacity because we have just migrated a task (and its utilization) > out > > > >> >> And if we really dropped below 100% utilization, we should hit idle >> fairly soon.