Received: by 10.192.165.148 with SMTP id m20csp1925498imm; Thu, 26 Apr 2018 04:17:40 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoX2DdnkeIN/E18UYKbGTsJdrwksEuXLYgQ3MLcdEC8cX1O2PAVFm4uH4QTzPbZjX7qaRJo X-Received: by 10.101.71.203 with SMTP id f11mr1605641pgs.235.1524741460877; Thu, 26 Apr 2018 04:17:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524741460; cv=none; d=google.com; s=arc-20160816; b=rl2U0qO3TuQyLbobvZMKgM/ydKtNltZ/6CIe9VrEdIpBA9U5lgQicJVYvbd/gKuTgi YoZ3aVKXIFcxOdyYJSIz+Ma4eMfkBdcdKUitCK1xaOKGZpTWKqmgw94fo2C8hAfC/dr3 8qAqKYziqBxungQCtgmAFG41mt2HTx4sRD2pP+PcrzCo0uhK/M2/wN470aUCnVKktzQB TJwChp3z0l8albF7B0LqDSQz8jxy6v9oUPh5NAHbfrw1hKHld9dtD8Gnp38iu0OrYfTq +KXoa/6UFmbb25rnenchs+6OONvRs8EfmcqaJ/RolFzOnSibre4zScEJu9J88R8ZREvJ 62eA== 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=zOww0C91Dvkc42REAofrle9dIRGUyV+EJADgHgInssI=; b=rkJDHUZqxNuWE5FaxjYoNuQeJOusLXR14DeXZp9wIuh6utO5CJMnPo2btiloDmypKk zJtnG+I2sAgcakqPc5KON6oUdbMdl53ofVspmo6ooBYvKdSVpi7PLCriEcH3Amor17rW N75zbHeVzFfmTkBulzFFjYmyxaUYXH9O8IuBiZYcYAXX9pFc9ChTbuhjphTFXSlNpg1w I8QVfYrtz7aehBumpzNDuVP/Y7dxot5XJbNxDNYIm5oTWiTkI13wRsZvb9ZitF9pM/ng 85fghzsb/0Vp83MMFYKmyoRZgO/Gs9QLiAIKYXLiVpdiCK2uqzvvbCEvPY6m2mDrwEjB sz5Q== 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 t18si17480431pfh.60.2018.04.26.04.17.26; Thu, 26 Apr 2018 04:17:40 -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 S1755529AbeDZLPm (ORCPT + 99 others); Thu, 26 Apr 2018 07:15:42 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:52168 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754428AbeDZLPi (ORCPT ); Thu, 26 Apr 2018 07:15:38 -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 D36C915AD; Thu, 26 Apr 2018 04:15:37 -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 C207F3F25D; Thu, 26 Apr 2018 04:15:35 -0700 (PDT) Date: Thu, 26 Apr 2018 12:15:33 +0100 From: Patrick Bellasi To: Peter Zijlstra Cc: Vincent Guittot , 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: <20180426111533.GX14248@e110439-lin> References: <20180406172835.20078-1-patrick.bellasi@arm.com> <20180410110412.GG14248@e110439-lin> <20180411151450.GK4043@hirez.programming.kicks-ass.net> <20180411153710.GN4082@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180411153710.GN4082@hirez.programming.kicks-ass.net> 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 17:37, Peter Zijlstra wrote: > On Wed, Apr 11, 2018 at 05:29:01PM +0200, Vincent Guittot wrote: > > On 11 April 2018 at 17:14, Peter Zijlstra wrote: > > > On Tue, Apr 10, 2018 at 12:04:12PM +0100, Patrick Bellasi wrote: > > >> On 09-Apr 10:51, Vincent Guittot 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. > > >> > > >> 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. > > >> > > >> 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). > > > > > > Specifically, the h_nr_running test was get rid of > > > > > > if (delta_ns > TICK_NSEC) { > > > j_sg_cpu->iowait_boost = 0; > > > j_sg_cpu->iowait_boost_pending = false; > > > - j_sg_cpu->util_cfs = 0; > > > > > > ^^^^^^^^^^^^^^^^^^^^^^^ that.. > > > > > > - if (j_sg_cpu->util_dl == 0) > > > - continue; > > > } > > > > > > > > > because that felt rather arbitrary. > > > > yes I agree. > > > > With the patch that updates blocked idle load, we should not have the > > problem of blocked utilization anymore and get rid of the code above > > and h_nr_running test > > Yes, these patches predate those, but indeed, now that we age the > blocked load consistently it should no longer be required. After this discussion, I think there is a general consensus about always add sg_cpu->util_cfs in cpufreq_schedutil.c::sugov_aggregate_util. Is that right? For the rest, what this patch proposes is a code reorganization which is not required anymore to fix this specific issue but, it's still required to fix the other issue reported by Vincent: i.e. util_est is not updated before schedutil. Thus, I would propose to still keep this refactoring but in the context of a different patch to specifically fixes the util_est case. If there are not major complains, I'll post a new series in the next few days. -- #include Patrick Bellasi