Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3144312imm; Tue, 29 May 2018 01:41:19 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqq/aQ7TH0BpqcvaRToCiGVejZmX9/t8GYLxzTUxOzVsjUIWiFFPiF1sdKW/YC1/ZhZS1PL X-Received: by 2002:a17:902:c5:: with SMTP id a63-v6mr16786036pla.149.1527583278954; Tue, 29 May 2018 01:41:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527583278; cv=none; d=google.com; s=arc-20160816; b=GaInwlcFysNLXqDziuWCWAHYdKq+3sPu+bKXwtCKJJ7UABT9Ru7dFhRIZj14pISpvq GwYK7CuwTGpDmLJnNRP8wc4p/6zgznEnaySQ12ZHfe8GrO26xkI94zmEKDpkxducNcFq n6MvICCYshP0pvxylWWDolF6P+l9cIkOJRJ5vxTkP0TjQQ+alN9Uh39qZM0LUkoklyZz LfjUefrDicZE8rk2gv9ArIYUccjmII6k2fxMwWTYdkkcd1ZCciXNAzc6n5FoYWpykVT9 0d1QJrZhFqr9vg8ELGVUTSub8kbpZCJJhklRycEIvnnJkhykxfv7cqTa2pDz2D1SnXQ5 EUMQ== 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=AWAtqsVey/Y0qqN/rad8knu1lA8mGY6SvxQafDOPqx4=; b=OKebmrv0ckseCZT3nFK/YIXQKcZDzkUHGPlb+f94IrdJSXdNOX+MWK3qAwh/8cvOyA cFaNlQL/KOJ5PpdPUWTwByoKhliODmGr2G305FxpDC8pxEECwFWGUFyAFePrLGSczoLR S9xJpZ7jnzLtJMW5FhJrvArrrdjzYhRTjkZIdUs2zuAjok2GPPf9wChArSajqpNvf57a kXnjYdlKTivE3mktmlsYOL67v78FJ9D9NXuuB8nRWjjcfFnZ643ceR+LwR0rlvVUMiZY F/Z2HNUIn3k1RC3s0Zea5jMXi5n5DrbmXlLqSfJgDWUUuAd6ju+IL0BECex0NoiRRPf5 xUNA== 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 p21-v6si9069567plq.94.2018.05.29.01.41.04; Tue, 29 May 2018 01:41:18 -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 S932493AbeE2IkQ (ORCPT + 99 others); Tue, 29 May 2018 04:40:16 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:35128 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932197AbeE2IkN (ORCPT ); Tue, 29 May 2018 04:40:13 -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 E88DF1529; Tue, 29 May 2018 01:40:12 -0700 (PDT) Received: from e108498-lin.cambridge.arm.com (e108498-lin.cambridge.arm.com [10.1.210.84]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2A80C3F25D; Tue, 29 May 2018 01:40:11 -0700 (PDT) Date: Tue, 29 May 2018 09:40:09 +0100 From: Quentin Perret To: Vincent Guittot Cc: peterz@infradead.org, mingo@kernel.org, linux-kernel@vger.kernel.org, rjw@rjwysocki.net, juri.lelli@redhat.com, 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: <20180529084009.GE15173@e108498-lin.cambridge.arm.com> References: <1527253951-22709-1-git-send-email-vincent.guittot@linaro.org> <1527253951-22709-6-git-send-email-vincent.guittot@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1527253951-22709-6-git-send-email-vincent.guittot@linaro.org> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 ? > + > + return util; > } > > static inline unsigned long cpu_util_cfs(struct rq *rq) > -- > 2.7.4 >