Received: by 10.192.165.156 with SMTP id m28csp1622158imm; Thu, 12 Apr 2018 00:05:36 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+WF97B7mcgVaAKXFL9E0+5+lRDycyPhD4fuf+qJGIpTkwZbkCwmg09yxXsZV/Q9kjaWyAp X-Received: by 2002:a17:902:594c:: with SMTP id e12-v6mr8489380plj.233.1523516736823; Thu, 12 Apr 2018 00:05:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523516736; cv=none; d=google.com; s=arc-20160816; b=IoFbo/lWzTrrQ11c6hYKv8aMYEB8P4AkaawsjBu8rP9s27peBgwbH7H7OSoq13QQqY fCLedDJhs3PWcUDQzyGS1Y67+UPwjwncYbF6pxkzlFdR+U2hj3OSM+H7W4LcICCpM182 zFi1it9q99k0Qos6lqSzBlXwyBgaGlrT91mOW99vdBKlTJBflOyad7/9amcyY5MxK+ry Kq2/e7+vAR4WHOP/p12E2Sz1sW0c+qCTsyZUT1KjBJvrr+wjZBqR2/Ko53V3Rr9XUBrO W/4qaegroR/gtiq1N5lUasG5rZ6hRyZQmv/bIhwxNKaEfpDogMkyEkCWDqCVxt9jYawR oYhw== 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=q2ZNTDzyBdwR3UsYj7I8k9t0UracudZCxuL3aErjet4=; b=YSvfKP+cfI1yWHimBlHYHpepgBggtp4+Vmu1qbRf9cWZBGyyQMqPkEXgS3xlM+zNNU H0malEnS5fdvsviNzp+WIR9YjzaAASw9UhHv15/QMRaM5zBh2Xwpt0iRXIrY5Q9UgDzd CHi46KuJk8ecr+bb2O1lVbBA+z9EyjEGYEKvWz3WmLNsNoorOWAA8/EPNJU5XJ7vjXsj RTWvCBn5wgx/3v3KDcYivaZlILXd8nuZFTddI+XGcj7Hi1BF+8/IoYaDFOe+S4717z5f Ku5VhBFV7RMJkUrdnI+sv+q0rDQikS/iix8+k6Ye6tC0jNAG+ZuYUpW+nzPzwg48FLA5 mg1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VNs7kfTu; 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 l9si1865557pgs.673.2018.04.12.00.05.00; Thu, 12 Apr 2018 00:05:36 -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=VNs7kfTu; 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 S1752901AbeDLHCK (ORCPT + 99 others); Thu, 12 Apr 2018 03:02:10 -0400 Received: from mail-it0-f51.google.com ([209.85.214.51]:39245 "EHLO mail-it0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752693AbeDLHCI (ORCPT ); Thu, 12 Apr 2018 03:02:08 -0400 Received: by mail-it0-f51.google.com with SMTP id e98-v6so5763108itd.4 for ; Thu, 12 Apr 2018 00:02:08 -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=q2ZNTDzyBdwR3UsYj7I8k9t0UracudZCxuL3aErjet4=; b=VNs7kfTuQN+LKQvgPkqrjxrfa0mUYjFNqddttLtOiLyhkLsN73HzvXsaBMm3jD9jVE BerJpIq8piE3urZlfYUGSuzEBJvQF1R6LKxCxF6EmKVGQp0dNm7kuZQmjkGchzX9ekzh 4PEzE/Fr1mE4Lov5maKlgN+YiMdd+jlAPYF2Q= 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=q2ZNTDzyBdwR3UsYj7I8k9t0UracudZCxuL3aErjet4=; b=YMITLl/dFsEhcf5gViekvEpL5Qy7MsZHEMB5HYDuWarNsinnd+OoWmIhBU+eb3XKEN s6IAskGWFjkurGsBD5NiFFZremBEFjMV7oAb4k6JRqeAuY28R4YKmHHWIUuv77c1inJ4 BlFhgZ7pBSPASNTxNVc5PAjyRk4APRSL49c+50Ena+LnwQoIarJg6GZc6IIHsBLxvFHd F9B0XA2YIwfLTGKmeVWvr/8OmaYI9CGE5HH15palACKIVnuojgg+VS3xRp0tPAlUejrK t0dUaVFyDCFHP5nIGebM2r1YiRR6RWJZoCoG3o9lU/YVYSM2m5M1tW3OukCBmVuhtVKV MiYw== X-Gm-Message-State: ALQs6tBMtUaskAl6EBjfRmjnJ+vRNd2sVCVX5PT93nlP0IdvkyCIp2eQ ehsUJbG9NmV2EEY3XhH1DdQ04mFrRi7FF8MaMNKHZlF4d8Y= X-Received: by 2002:a24:46cd:: with SMTP id j196-v6mr1963075itb.8.1523516527759; Thu, 12 Apr 2018 00:02:07 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.222.20 with HTTP; Thu, 12 Apr 2018 00:01:47 -0700 (PDT) In-Reply-To: References: <20180406172835.20078-1-patrick.bellasi@arm.com> <20180410110412.GG14248@e110439-lin> <20180411101517.GL14248@e110439-lin> From: Vincent Guittot Date: Thu, 12 Apr 2018 09:01:47 +0200 Message-ID: Subject: Re: [PATCH] sched/fair: schedutil: update only with all info available To: Joel Fernandes 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 Joel, On 11 April 2018 at 23:34, Joel Fernandes wrote: > 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. Sorry for the confusion. By runnable utilization, I meant taking into account the number of running task (cfs_rq::h_nr_running) like what is done by commit (8f111bc357a) > 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. yes > > 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. :-( As Peter mentioned, the change in commit (8f111bc357a) was to remove the test that was arbitrary removing the util_avg of a cpu that has not been updated since a tick But with the update of blocked idle load, we don't need to handle the case of stalled load/utilization > > thanks! > > - Joel