Received: by 10.192.165.156 with SMTP id m28csp533607imm; Wed, 11 Apr 2018 03:19:09 -0700 (PDT) X-Google-Smtp-Source: AIpwx48vUm+7qGkPu53xtzDD9mVk8n/9IPD8ZwRfMz3/GHYSwcznyRba/jafm3uSsEyJZIM501kP X-Received: by 10.101.96.13 with SMTP id m13mr628301pgu.452.1523441949608; Wed, 11 Apr 2018 03:19:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523441949; cv=none; d=google.com; s=arc-20160816; b=OTwpvPYGRoLj94HF1TrjY+5wV1zYwu1Q9Bsf4bk8YVkx1eXdMvS44O2b3b51gVkTBM +x2spXdIKnpFq+V3g7ndUg/JC5kZDfg4YNOapNt/enhTvdKBJhboGuy12zI3XiyWPVUv 0l/3RUkC0ht7dtpvXqudaMHv2CId4FZ+UWP7kdPn/JMq62pLjUyNZc+v1yYXICJ6M7bH pIuc1uab3SGlBIbgQISAWRG/XaIElWeXKYMwFkD/bGP/FfNxSsLzadyJSQCEWWWIWF5R /OGsx4znMDcXPyXJG3Zgx9iyDlL+MVVAJOBkoxbQg4E1eHY5ZCstN+DB1nrieiC8WH+D A22g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=jw56z+4v8yKJ1yycEweqyJKqQFhWSfxAN7FunZ37mh0=; b=woL62Xh3+Z20+H/qeDvZIHxQx1Hyd7fEAFPcHxT+65H+D7q3On0mCj3wZiMm66XL3x SmklexatQpw3mVxvmareNZmZj6U+qOnTakadMp8N4aWxF+FWPRHLfrGUmoyopo9QkWe0 LBBjdhpFWL1+o7Cf/0QvLm9X7DxG9uH9t7GSxVesHA9iJ6FYRhBnua15cKIKm9cj6udz TZG+UPJ21UmTwimBeyJTTQlL8AfX4h1DcZgeD+oHwgA1W6dYdRYYFxZuEBUn/73I7MZW 5ndzGyeE6rTZ0Ds04HXhLGU9piv1ARSc4n1YxQmUpelTvikRBO0IE1R+rRFR7u5LBeXm tahw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p23si641808pfj.40.2018.04.11.03.18.32; Wed, 11 Apr 2018 03:19:09 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752323AbeDKKPY (ORCPT + 99 others); Wed, 11 Apr 2018 06:15:24 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47558 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbeDKKPW (ORCPT ); Wed, 11 Apr 2018 06:15:22 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 17B3280D; Wed, 11 Apr 2018 03:15:22 -0700 (PDT) Received: from e110439-lin (e110439-lin.cambridge.arm.com [10.1.210.68]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 063913F587; Wed, 11 Apr 2018 03:15:19 -0700 (PDT) Date: Wed, 11 Apr 2018 11:15:17 +0100 From: Patrick Bellasi To: Vincent Guittot Cc: Peter Zijlstra , linux-kernel , "open list:THERMAL" , Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Juri Lelli , Joel Fernandes , Steve Muckle , Dietmar Eggemann , Morten Rasmussen Subject: Re: [PATCH] sched/fair: schedutil: update only with all info available Message-ID: <20180411101517.GL14248@e110439-lin> References: <20180406172835.20078-1-patrick.bellasi@arm.com> <20180410110412.GG14248@e110439-lin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11-Apr 08:57, Vincent Guittot wrote: > On 10 April 2018 at 13:04, Patrick Bellasi wrote: > > On 09-Apr 10:51, Vincent Guittot wrote: > >> On 6 April 2018 at 19:28, Patrick Bellasi wrote: > >> Peter, > >> what was your goal with adding the condition "if > >> (rq->cfs.h_nr_running)" for the aggragation of CFS utilization > > > > The original intent was to get rid of sched class flags, used to track > > which class has tasks runnable from within schedutil. The reason was > > to solve some misalignment between scheduler class status and > > schedutil status. > > This was mainly for RT tasks but it was not the case for cfs task > before commit 8f111bc357aa True, but with his solution Peter has actually come up with a unified interface which is now (and can be IMO) based just on RUNNABLE counters for each class. > > The solution, initially suggested by Viresh, and finally proposed by > > Peter was to exploit RQ knowledges directly from within schedutil. > > > > The problem is that now schedutil updated depends on two information: > > utilization changes and number of RT and CFS runnable tasks. > > > > Thus, using cfs_rq::h_nr_running is not the problem... it's actually > > part of a much more clean solution of the code we used to have. > > So there are 2 problems there: > - using cfs_rq::h_nr_running when aggregating cfs utilization which > generates a lot of frequency drop You mean because we now completely disregard the blocked utilization where a CPU is idle, right? Given how PELT works and the recent support for IDLE CPUs updated, we should probably always add contributions for the CFS class. > - making sure that the nr-running are up-to-date when used in sched_util Right... but, if we always add the cfs_rq (to always account for blocked utilization), we don't have anymore this last dependency, isn't it? We still have to account for the util_est dependency. Should I add a patch to this series to disregard cfs_rq::h_nr_running from schedutil as you suggested? > > The problem, IMO is that we now depend on other information which > > needs to be in sync before calling schedutil... and the patch I > > proposed is meant to make it less likely that all the information > > required are not aligned (also in the future). > > > > -- > > #include > > > > Patrick Bellasi -- #include Patrick Bellasi