Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3194276imm; Tue, 29 May 2018 02:53:01 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo/P8UY3jckHffK/PeQ163I12ooQe6SOkG/SWhnuktbV9QTqhWZED/D9bxmwp8OgKXZbrYH X-Received: by 2002:a17:902:8e8b:: with SMTP id bg11-v6mr16660166plb.95.1527587581396; Tue, 29 May 2018 02:53:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527587581; cv=none; d=google.com; s=arc-20160816; b=xQUZgXASGalo6k/Ui5F0Z/75GWUZLa3x0ed1kGaEWzpfbjWEr2/Gs+l1zfFFFCUiUu FWKrmVzbqUi+sDqqywrPJDEmb58OjrmacKV7MeQWu7pT5g/RaqwgckygWB0V+iIV6ojO 3x6DJroTk2LhUgnkPnBIWk7B9tDw+VDfRzdiAMBEzzQajDcUWNWbdoClc0++pmQHZQ1i o+6VQTLtDFWDRzRE9nwg58oZYsytA8du2ICRdfXQhYmvduneZ6Wpakh6LzERj0lPl+Dm gTpAWzaWMXYmHG9J0bwjauWdHnh81KoBViui8zSl6IRAne0ApZbzWbxJyPwdXArhBWC8 gMwQ== 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=5Cgtp74bJqnQXiq5B6HtQrlkYT9d50wClNbda88gBec=; b=h9oCaYOwY6OE0zIoQwk+B3tu4smfh8DdES6y0/G4kLfZj42MTwPgcqVD68bx+HDBbW zaXbysBpVLDyoCGb8NlpAAr3R8jdDby+6HI/gwDnkQX7Sv5684yIreoMtT6Ms5Y2bXsR ESR8ahXWzkDrLVtWDm0X5Ly/LBK0YrAmCdKv4G2wMBmIiKmUfx7vn2bAnt+bIWzqAMpS LnY+MRNFRu9aliSgDIjpkICiAly7meOOBopl9GhYyDSiK5qdM5uVWlKjVLM3TeKV1cc2 MPVu29wsVoahfXESSGWx3Qq7IbH0wqKwZ70zVaA139BJ6Wc9uw8aBPhQ6DBOF2qmdrjq IMkA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i1-v6si7641775pgc.100.2018.05.29.02.52.47; Tue, 29 May 2018 02:53:01 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932632AbeE2JwM (ORCPT + 99 others); Tue, 29 May 2018 05:52:12 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:54022 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932476AbeE2JwH (ORCPT ); Tue, 29 May 2018 05:52:07 -0400 Received: by mail-wm0-f68.google.com with SMTP id a67-v6so38567052wmf.3 for ; Tue, 29 May 2018 02:52:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5Cgtp74bJqnQXiq5B6HtQrlkYT9d50wClNbda88gBec=; b=tx61Rq11b0boFH2wbpMos+tTwQRLEb/kzRIVYcwObNXtpO7ElWAx3jNLZ8+M+US5xO E1/DFn+uaIujpV+dxGg6qhyxiDtqUEZbVSEpR2qWDKFCbEeSgVuvG4qL/v/pZRaftIqQ 7fwqC2W8k41314ugIlqvGcw3yQeHCz2DbngGbCIYEIbdnjoOSIGML48ABdDeZOdXxg3V jfOMDcRntdws+TFEvyPsPZ6khNj9fSfz1AlNvIUXRM29yZenmzFbexXHgs0LsVe0zddq G/k5OvjjixaR0zbNhFIcv+15RbWps5PbdIRvXvSc2pexh5BUZRSfIh22l0WvQlrXS90X l8yQ== X-Gm-Message-State: ALKqPwdQY+z8WnKNCbmm1BbR0SZqQYBhR4a+Wm5b/t/WIowQkHrEEZlX HKaFtEa5rQY7OYzsk/p0U0wMBw== X-Received: by 2002:a1c:d50a:: with SMTP id m10-v6mr11951995wmg.72.1527587526236; Tue, 29 May 2018 02:52:06 -0700 (PDT) Received: from localhost.localdomain ([151.15.207.242]) by smtp.gmail.com with ESMTPSA id p189-v6sm15459690wmg.18.2018.05.29.02.52.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 29 May 2018 02:52:05 -0700 (PDT) Date: Tue, 29 May 2018 11:52:03 +0200 From: Juri Lelli To: Quentin Perret Cc: Vincent Guittot , peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, dietmar.eggemann@arm.com, Morten.Rasmussen@arm.com, viresh.kumar@linaro.org, valentin.schneider@arm.com Subject: Re: [PATCH v5 05/10] cpufreq/schedutil: get max utilization Message-ID: <20180529095203.GD8985@localhost.localdomain> References: <1527253951-22709-1-git-send-email-vincent.guittot@linaro.org> <1527253951-22709-6-git-send-email-vincent.guittot@linaro.org> <20180529084009.GE15173@e108498-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180529084009.GE15173@e108498-lin.cambridge.arm.com> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/05/18 09:40, Quentin Perret wrote: > Hi Vincent, > > On Friday 25 May 2018 at 15:12:26 (+0200), Vincent Guittot wrote: > > Now that we have both the dl class bandwidth requirement and the dl class > > utilization, we can use the max of the 2 values when agregating the > > utilization of the CPU. > > > > Signed-off-by: Vincent Guittot > > --- > > kernel/sched/sched.h | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h > > index 4526ba6..0eb07a8 100644 > > --- a/kernel/sched/sched.h > > +++ b/kernel/sched/sched.h > > @@ -2194,7 +2194,11 @@ static inline void cpufreq_update_util(struct rq *rq, unsigned int flags) {} > > #ifdef CONFIG_CPU_FREQ_GOV_SCHEDUTIL > > static inline unsigned long cpu_util_dl(struct rq *rq) > > { > > - return (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> BW_SHIFT; > > + unsigned long util = (rq->dl.running_bw * SCHED_CAPACITY_SCALE) >> BW_SHIFT; > > + > > + util = max_t(unsigned long, util, READ_ONCE(rq->avg_dl.util_avg)); > > Would it make sense to use a UTIL_EST version of that signal here ? I > don't think that would make sense for the RT class with your patch-set > since you only really use the blocked part of the signal for RT IIUC, > but would that work for DL ? Well, UTIL_EST for DL looks pretty much what we already do by computing utilization based on dl.running_bw. That's why I was thinking of using that as a starting point for dl.util_avg decay phase.