Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10176744rwr; Fri, 12 May 2023 05:03:43 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ64kyZFAC4RKutel4BLl/enapqDE17M3I9BDrthN8yx9SIcka3xZ16TSgYOfyHV8+nKWmqA X-Received: by 2002:a17:902:710e:b0:1a1:d366:b085 with SMTP id a14-20020a170902710e00b001a1d366b085mr19246780pll.21.1683893023575; Fri, 12 May 2023 05:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683893023; cv=none; d=google.com; s=arc-20160816; b=Qx99qwDRYkGIIDik79iQU+0qraYWi/w8IwfNs/5y9ClrRzDkwqVQ3OgC1AEnFGk3v9 usWaQjS0ExvBxwOf/ipobBdh6R34mD4wfBgC4dLAZdbO1507fmsZj7J2md53kXqY/0nS CEpOMl/noI7MR8Fw8G4xaJ9Ndw96zKudTHZLiqmNkv7QKqRj8chwUGeLexhIIwOqpE63 kU/jXEXuAUvOP/nR4AE4ysFxWTOWFj+TGdgIVos8hzVKwBiC2Ft1KFG2i9CPBKj++Jt9 FZD4mPQsTamEta7sKBFFs/6fTxHtdwRDMrXmcBzcjoix5HHiW9qNJ2jHB2c6N1fL9H3j x52g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fr5RqDNuP9UAJWvYniAU4zJwVuLlQEbB7PDS1yiTKlw=; b=xjJ8x/0NsOd7nzjTeKNsD+q0lCEQPUzVBSRVPl52UpDPWZvfLG4VCxoOJpBI/E/ZMe k3QD8umChjXbL2TwW1w6B/tDrSF0DxqQdE5oM87E8lgXg5hTEvhBMCvI2E49kYsLT6HL VNUeJLjI+NP9pz25Ab9G/qlhKSKOFHt1Ij0XmQ9Rh1jSh3in0AUoLww0RFTr4PfiPkMv 4Mj2iHnwZWKQbA87EJ2sQ+lzhXTvoiuK09xG6zIgimwRNyVTh8lrd2Pv6CJUN4GDX+Gi S9hHPvsQzjJKxvQa1WygM4iOGmFtJLZW0Bv+wfErQYTL1ylEZHiJaj45LvF/hxhKqNhL qoVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eZ+p05tt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h2-20020a170902748200b001aafaf1a917si8577788pll.472.2023.05.12.05.03.27; Fri, 12 May 2023 05:03:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=eZ+p05tt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241029AbjELLcv (ORCPT + 99 others); Fri, 12 May 2023 07:32:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240422AbjELLcs (ORCPT ); Fri, 12 May 2023 07:32:48 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72684D05E for ; Fri, 12 May 2023 04:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=fr5RqDNuP9UAJWvYniAU4zJwVuLlQEbB7PDS1yiTKlw=; b=eZ+p05ttQr/MYRdZJx+VXIgKyq BJMDMK+r919KyMi66mcLxIflfDMrEmaq7DdDituZ3R44cUQcQWPXKSMv7PVeBK+75s8jbqZJh2H3W bNFBGQmQgCUt+NI4Ju/r/wq2iaieBbPu6LzUvTKgaZ80i6PJNxcrWSm3QNmi9i3bzaLNSxbGsMk3Y 5qevhzHWI/8Y4ziZM/86GTX3D1QN/C9VAzZAXlWaZODODakZnppu98mM8TW7HSUA8X8xS9ck5vmRB O7Noc805CYBykbrLHzynCjIIMoP1oONbAmHU655D0awnWYdi8y/nO8uGV3KZJLRwZNzOuSl0gdTqL DBiLL83w==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1pxR0k-000ecj-16; Fri, 12 May 2023 11:32:34 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id E3495300338; Fri, 12 May 2023 13:32:32 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id C22D02C8B6AAE; Fri, 12 May 2023 13:32:32 +0200 (CEST) Date: Fri, 12 May 2023 13:32:32 +0200 From: Peter Zijlstra To: Dietmar Eggemann Cc: Ingo Molnar , Vincent Guittot , Qais Yousef , Kajetan Puchalski , Morten Rasmussen , Vincent Donnefort , Quentin Perret , Abhijeet Dharmapurikar , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 2/2] sched/fair, cpufreq: Introduce 'runnable boosting' Message-ID: <20230512113232.GX4253@hirez.programming.kicks-ass.net> References: <20230512101029.342823-1-dietmar.eggemann@arm.com> <20230512101029.342823-3-dietmar.eggemann@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230512101029.342823-3-dietmar.eggemann@arm.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 12, 2023 at 12:10:29PM +0200, Dietmar Eggemann wrote: > diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c > index e3211455b203..3b902f533214 100644 > --- a/kernel/sched/cpufreq_schedutil.c > +++ b/kernel/sched/cpufreq_schedutil.c > @@ -155,10 +155,11 @@ static unsigned int get_next_freq(struct sugov_policy *sg_policy, > > static void sugov_get_util(struct sugov_cpu *sg_cpu) > { > + unsigned long util = cpu_util_cfs(sg_cpu->cpu, 1); > struct rq *rq = cpu_rq(sg_cpu->cpu); > > sg_cpu->bw_dl = cpu_bw_dl(rq); > - sg_cpu->util = effective_cpu_util(sg_cpu->cpu, cpu_util_cfs(sg_cpu->cpu), > + sg_cpu->util = effective_cpu_util(sg_cpu->cpu, util, > FREQUENCY_UTIL, NULL); > } > > diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c > index 1220cfbee258..3a10fe5988d6 100644 > --- a/kernel/sched/fair.c > +++ b/kernel/sched/fair.c > @@ -7355,7 +7362,7 @@ eenv_pd_max_util(struct energy_env *eenv, struct cpumask *pd_cpus, > > for_each_cpu(cpu, pd_cpus) { > struct task_struct *tsk = (cpu == dst_cpu) ? p : NULL; > - unsigned long util = cpu_util(cpu, p, dst_cpu); > + unsigned long util = cpu_util(cpu, p, dst_cpu, 1); > unsigned long cpu_util; > > /* > @@ -10561,7 +10568,7 @@ static struct rq *find_busiest_queue(struct lb_env *env, > break; > > case migrate_util: > - util = cpu_util_cfs(i); > + util = cpu_util_cfs(i, 1); > > /* > * Don't try to pull utilization from a CPU with one When you move that comment from cpu_util_cfs() to cpu_util() please also add a paragraph about why boost=1 and why these locations, because I'm sure we're going to be asking ouselves that at some point.