Received: by 10.192.165.156 with SMTP id m28csp628339imm; Wed, 11 Apr 2018 05:00:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx483ICbi8wZuYEMIbqc+6cdFQJONmquC985ICTQ11OmWMHlr+qdaXt4eOeIIbr7Cr4wAj4oB X-Received: by 10.99.146.30 with SMTP id o30mr3259580pgd.115.1523448032265; Wed, 11 Apr 2018 05:00:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523448032; cv=none; d=google.com; s=arc-20160816; b=pQZFb3PmSp3urU/Ryn48Wc8bFaD8ISOw3HBD60+ZbFGEkaysiFF8fjaQDDU5Yfgmun e47eMcbKF7AIYetVz+BmkyiWroqnhcPA683n2OSQa7rW1RL8HdHrVG2RrERH07TDdrDe HiaTn8d/WiUGggFuc22om0rX/lj3jQgTIN+KRBaAnFGjiQYGMGn8HiOI28SVf4S5xT5L x2lk0NhflEr9w7IfKHNxYYl8cVT7w+POxSaKpCopHJtivbyIgpe4qsklXSH5eIZ0AXik VsdbYScTpkI1WWwi61XYwf8PZyrTc3iRri+OfarHIFqjmGXLQB5KxyyyIf258NwxyofV J/uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Hbt1ig2sSnJAyEgEJEPZ7wryMyID4zKaYdECSIDHv38=; b=tVHujEUv5D2Dw89yNX30oufKczTuODKFddlux1ahZOkxSFWvIBZHbd8ePB5zxsosjA tXAPnyouQ0F7r6KtEbbwdf5rRDXwF8h5PGchvvJFJDWp9lzj/kTpbNTdAkneZ25nQmYy H3gUPILIFh/3hxR8ivtt0+U2vCWEzZnfXpsDF3EB/ugNNE5pSi9BBM4zN072nVm+YsMe xglOeFRDoNIMK4tGCHO7TEMyiDZ3jtzOhes5w5a3gGRjteWXetdV99FGOEq/QweZPit4 X7orf0qiYX8+7gK8z+A6BCI4q/3XsXTt13Oq7QpR/s4dqejENBQ7kSosBfGJFFLRUEAh NyHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=XcYgDCRz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m190si664613pgm.254.2018.04.11.04.59.54; Wed, 11 Apr 2018 05:00:32 -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; dkim=pass header.i=@linaro.org header.s=google header.b=XcYgDCRz; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752855AbeDKL5U (ORCPT + 99 others); Wed, 11 Apr 2018 07:57:20 -0400 Received: from mail-io0-f175.google.com ([209.85.223.175]:44377 "EHLO mail-io0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752335AbeDKL5S (ORCPT ); Wed, 11 Apr 2018 07:57:18 -0400 Received: by mail-io0-f175.google.com with SMTP id d7so2027585ioc.11 for ; Wed, 11 Apr 2018 04:57:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Hbt1ig2sSnJAyEgEJEPZ7wryMyID4zKaYdECSIDHv38=; b=XcYgDCRzVJ8Y3k1xGlacdH63CDrYtB+ASGZFEKKZQKIff5wHFm7npVxaYlNFQ/Ljb9 ukds6gtln1+Auj/yg8fruWX0fWsqfkrblgFWVfB51vQ17SV5zRiZWAjjjUu4sGVSHLOi To8VP6fnaQYloHdTOgjEQbSaWD6UAUZVq98U4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Hbt1ig2sSnJAyEgEJEPZ7wryMyID4zKaYdECSIDHv38=; b=YDsdbYP/Zdv6AW/LP2olxCSJ0xtpsJwQB8IVuyvOeCIlWE/mcNHaYmT8ZvEnN/5232 f3vxt/TKyu9EreGQEdeztRxYNIsVd2PVdR7eDqHdyZYylezcMWdjOXlPzoA9HRFIb81N lJpoEhqkgAI5R5mcXu8a2CLJ7m7wlKz+2qxMjYEiJtInIagh6YU647TGVAIm35qLnKBs uX588nmkdihvJcybMTM2CTtABeXFU4l59hDtnAcMvli0IEaPwlzEtrKXaywMU2MPTM9j Uw5Cvx7St/m+Y0I2LJMvN5vmDzj57I8Mfu4/RWDAxniSwrKq3FHogJ6uLSs+dW2L+gX/ m33Q== X-Gm-Message-State: ALQs6tAry1tSYeWw1UdhiWWSWl+xl2PJoixcc34DqlixdL67DXL6VFPk JhVeVhc6rUT5bu/G6FaUOBCPgHpMM5Y6ghK1nsb2fg== X-Received: by 10.107.163.200 with SMTP id m191mr4304483ioe.295.1523447837713; Wed, 11 Apr 2018 04:57:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.222.20 with HTTP; Wed, 11 Apr 2018 04:56:57 -0700 (PDT) In-Reply-To: <20180411101517.GL14248@e110439-lin> References: <20180406172835.20078-1-patrick.bellasi@arm.com> <20180410110412.GG14248@e110439-lin> <20180411101517.GL14248@e110439-lin> From: Vincent Guittot Date: Wed, 11 Apr 2018 13:56:57 +0200 Message-ID: Subject: Re: [PATCH] sched/fair: schedutil: update only with all info available To: Patrick Bellasi 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11 April 2018 at 12:15, Patrick Bellasi wrote: > 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. But do we really want to only take care of runnable counter for all 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? yes > > 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? yes > > 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? It's probably better to have a separate patch as these are 2 different topics - when updating cfs_rq::h_nr_running and when calling cpufreq_update_util - should we use runnable or running utilization for CFS Vincent, > >> > 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