From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751211AbdEaKlR (ORCPT ); Wed, 31 May 2017 06:41:17 -0400 Received: from foss.arm.com ([217.140.101.70]:42156 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750912AbdEaKlQ (ORCPT ); Wed, 31 May 2017 06:41:16 -0400 Date: Wed, 31 May 2017 11:41:11 +0100 From: Juri Lelli To: Peter Zijlstra Cc: Vincent Guittot , mingo@kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com Subject: Re: [RFC PATCH 1/2] sched/rt: add utilization tracking Message-ID: <20170531104111.cep53srg5r3ldmh5@e106622-lin> References: <1495616452-7582-1-git-send-email-vincent.guittot@linaro.org> <1495616452-7582-2-git-send-email-vincent.guittot@linaro.org> <20170531094047.p3kkmj3xnhvunabu@hirez.programming.kicks-ass.net> <20170531103017.3voouif2ixwbpbyn@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170531103017.3voouif2ixwbpbyn@hirez.programming.kicks-ass.net> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/05/17 12:30, Peter Zijlstra wrote: > On Wed, May 31, 2017 at 11:40:47AM +0200, Peter Zijlstra wrote: > > On Wed, May 24, 2017 at 11:00:51AM +0200, Vincent Guittot wrote: > > > schedutil governor relies on cfs_rq's util_avg to choose the OPP when cfs > > > tasks are running. When the CPU is overloaded by cfs and rt tasks, cfs tasks > > > are preempted by rt tasks and in this case util_avg reflects the remaining > > > capacity that is used by cfs tasks but not what cfs tasks want to use. In such > > > case, schedutil can select a lower OPP when cfs task runs whereas the CPU is > > > overloaded. In order to have a more accurate view of the utilization of the > > > CPU, we track the utilization that is used by RT tasks. > > > DL tasks are not taken into account as they have their own utilization > > > tracking mecanism. > > > > Well, the DL tracking is fairly pessimistic; it assumes all DL tasks > > will consume their total budget, which will rarely, if ever, happen. > > > > So I suspect it might well be worth it to also track DL activity for the > > purpose of compensating CFS. > > Again, it seems I have this CPPC/HWP crud firmly stuck in my brain. > Because I was thinking: > > min_freq = dl_util > avg_freq = dl_avg + rt_avg + cfs_util > > > But given we don't actually have that split... meh. > Right, interesting. So, I guess the question is: should we have it? :) IMHO, it makes sense and seems to benefit mobile use-cases I'm looking at. rt_avg though it also seems to build up very slowly (at least with default configs). I'm experimenting with Vincent proposal and it looks better (w.r.t. using rt_avg). Also summing up signals that behave similarly doesn't seem the wrong thing to do.