Received: by 10.192.165.156 with SMTP id m28csp1209682imm; Wed, 11 Apr 2018 14:38:54 -0700 (PDT) X-Google-Smtp-Source: AIpwx48NlqgyCYtgBGstyVUEm4zKc6qmpSU3fMvmv8/66yZKvIZaY/Km5IjvpWosuem3bAYOCUIA X-Received: by 10.99.43.80 with SMTP id r77mr4589845pgr.193.1523482734847; Wed, 11 Apr 2018 14:38:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523482734; cv=none; d=google.com; s=arc-20160816; b=NTzAK2m/SBPgJVG+9zM/26w/F2ykapMitSkvpQ3hggvMO01JNUmRqje2bnDJAG8kDO TwlVAJIqVizssTbZ/sgvTJqc+xTmTlnUWQyGJnehtEeOlypUwairVxtefBr6+hsU8eKM qZD3QKCPFTyOyzFx6HomwI/R/6lAvDZJ68QixsU96VU6kWxuzDC6c0ftsvFCA7KRX/5l Q9Sa8gw8xocihS3me0TdSvQRhPfP+AwZ+TIt7WsSax2gBMNPwBOCs1oLeowTrI6oHYUD pB45dy6bSWeLJtPLlma195dTvnaLooLSHVRlg4oWzeSJ6uNrDCQGhAx3foL1nMC4Pp9J 1VaQ== 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=11B7pTwVuApjaPrkrwjRbnm2xfVX/HvmTESAqQAIho0=; b=Cce+0tHwXPx1E1SXWcvwREfTdgeYBOfhRfyBk2fO02VYQeBbhqdAL2tCaynkSg6VeJ JSqCvjw8km5LtiEAnvlivXRF8vViedz3T7xuN4f6EbRR8TUtWGwYvP/sDV6jmNE791bC N7CMNxzC+TZg6hfoZ87zQbqy4rGkC/ZEN0N1h35FysWvLswwbw0MN7gHq2jfqDvvxPJh HxWY1xca/UOZHmpOuwgKDHL79AG/vLAqXFg2zB4JFYDzScLjaQWqqynelWUSz6cv18gE feqBCSSalH32zBpFXFwv1UeZQdzo+tcznDC74S0UiOQt3yK17VFTOVKhUWvOsL56mKaw sZLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=CPVkb0Hi; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9si1193717pge.750.2018.04.11.14.38.17; Wed, 11 Apr 2018 14:38:54 -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=@google.com header.s=20161025 header.b=CPVkb0Hi; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752915AbeDKVe6 (ORCPT + 99 others); Wed, 11 Apr 2018 17:34:58 -0400 Received: from mail-it0-f47.google.com ([209.85.214.47]:54342 "EHLO mail-it0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752424AbeDKVe4 (ORCPT ); Wed, 11 Apr 2018 17:34:56 -0400 Received: by mail-it0-f47.google.com with SMTP id h143-v6so4684813ita.4 for ; Wed, 11 Apr 2018 14:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=11B7pTwVuApjaPrkrwjRbnm2xfVX/HvmTESAqQAIho0=; b=CPVkb0HiEDxshoK5p1ixq4N+Ug6YI+51UpCsDtIfAqkIfoIV0emttmGaTv0P/kTIQa 45yX0vgWVIRParrifdQcJ9C5sJj8sJ47Ca5c1xiyczKSyLRpFVHQR2fLyqPqPRg1BwAN cGFtcXo/8QqHX3vu52lRtcLY3EbZivFeA1fXUUfnBO7IgGYtLScM04L6xVsXMXYGYK3X R5RZ67jOZnVmb4iEHDuJpWJkxKLMdX2I/gG1yP4kn3ovHTjn3SGFjkCl+Nn7ynFYK1ie zHLpbQ1yzYVGuitjy0UrrmEfU4tc5t2IdJCEJQGhhIXusa7qoqlTS9s7Y2DvubgIf2bD EQcA== 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=11B7pTwVuApjaPrkrwjRbnm2xfVX/HvmTESAqQAIho0=; b=Bt6hASq0z7yHFVmvsnJ3P4OYA0RfR3zwKa4Xvera2HF9+8V2ZdSxsYXowvaSB30No7 fxn+TL05m3jzstQ0ZLGSs/E9mn7E52whd6oT6r4opBv8HvNk+4MisJZpSMZHCgjWTBD9 2cCoWSwIpmsQnGwTBl3fLjhBtZR8OR1l0oG54cdQ+pSLdGlNDP0W///Sahb9Wk7jaXZx KYpHf7QuSACyMgFLFv7uHAYAmF+88YcQ/UmkzfG0AgojFt6Y2/DNhaTiebWnvx0/9PYB 9Fx6msajx8Oai8Z4wpx+Sm5WQ8QncQbpmkMq6AUJmYPR+8IsPg54ndZTMuWOlU3usXuP yCCg== X-Gm-Message-State: ALQs6tBC/24YMGdQta2MXYrqyjqHNwueBkV18Ktc/4JjBKovkBogcSQ9 3M0tYfN4xKM57qpXh2UjUcTWEYr8YLh22LoqsJoaFQ== X-Received: by 2002:a24:fd03:: with SMTP id m3-v6mr5778738ith.47.1523482495409; Wed, 11 Apr 2018 14:34:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.181.213 with HTTP; Wed, 11 Apr 2018 14:34:54 -0700 (PDT) In-Reply-To: References: <20180406172835.20078-1-patrick.bellasi@arm.com> <20180410110412.GG14248@e110439-lin> <20180411101517.GL14248@e110439-lin> From: Joel Fernandes Date: Wed, 11 Apr 2018 14:34:54 -0700 Message-ID: Subject: Re: [PATCH] sched/fair: schedutil: update only with all info available To: Vincent Guittot Cc: Patrick Bellasi , Peter Zijlstra , linux-kernel , "open list:THERMAL" , Ingo Molnar , "Rafael J . Wysocki" , Viresh Kumar , Juri Lelli , 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 Hi Vincent, On Wed, Apr 11, 2018 at 4:56 AM, Vincent Guittot wrote: > 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 By runnable you don't mean sched_avg::load_avg right? I got a bit confused, since runnable means load_avg and running means util_avg. But I didn't follow here why we are talking about load_avg for schedutil at all. I am guessing by "runnable" you mean h_nr_running != 0. Also that aside, the "running util" is what was used to drive the CFS util before Peter's patch (8f111bc357a). That was accounting the blocked and decaying utilization but that patch changed the behavior. It seems logical we should just use that not check for h_nr_running for CFS so we don't miss on the decayed utilization. What is the use of checking h_nr_running or state of runqueue for CFS? I am sure to be missing something here. :-( thanks! - Joel