Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6819611rwb; Wed, 18 Jan 2023 09:43:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXvVodwfqtsXtXDYA73V1CAt6NV8csh+zmVSYtHSZUsMc9tijtOWtR+5XIWhGzCluJuEwLen X-Received: by 2002:a17:907:5014:b0:7cd:ffd:51f2 with SMTP id fw20-20020a170907501400b007cd0ffd51f2mr7076772ejc.57.1674063831331; Wed, 18 Jan 2023 09:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674063831; cv=none; d=google.com; s=arc-20160816; b=aQDeNaaLyTDwbSkh80NNQp8a9EBmXVXXKXoqUffS+sp+FMNvetbQzKuZIZ3F40G1Cj Z+7Ysrkvz6VPBETlhU0ytjMzB8bf3PHmsK3yQUMoiMOxiZWRMbTLaWWaCU5T+oGYJfUr uTKprC/rO0Sge0/YUQtngtI5xeV2ZtQzmLMiGlMIYiOQb7rJgr/3Ggz0NbC4/P5fpvDY CZVDOR59HIlyqTj3cC3nfy0y6GaEFF1zgo1DIRtOO8wsu29go9iOR3Aq8Fp/Qx1RnkZF Nmj+CvkF7Zn/L39pG6IIBar1h0zEIwLnUrJpAyO81WfEb5G6eDCqMys4Its9fdMyzOy4 /fKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=REZ5YUYlNu/23jV6S1aVuvPtuc18DbpCwNnSRaw5piU=; b=C37KEg6JLWeOdPcTdB2gTdMZoqs7LjqhAkwOZ5NDaml140sjr6f3h1zPt9I0dZPPf+ TL5nKvnHZBvCkF9R9N4zjn4tlVCm3DLoDoxCsc33lU37qWB30f6cIwi9+9ABcvYmnGgO 9PnXhgJil+rtz1Hhe4gIVsxMGI6cv6U/1KIrNBm5c+UT72H9wNhtWG3lgeMGVBLc5I7A W0mRf/JMrQbqxhtlDI3lnzxqdaahn8o1wKOUd8rE3o2k7jI2YFLFDlhuukYdvbTN0O4e OyeTJok3Xnm4cfZpjnJDguEIVh1Q837TJMOx/MKgJC/tUmdd5lBZZEIZaoxDMMASsnR6 344w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xh10-20020a170906da8a00b007c0ea5a7ca4si14497307ejb.858.2023.01.18.09.43.40; Wed, 18 Jan 2023 09:43:51 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229801AbjARQVS (ORCPT + 45 others); Wed, 18 Jan 2023 11:21:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbjARQUr (ORCPT ); Wed, 18 Jan 2023 11:20:47 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1A71D54B2E; Wed, 18 Jan 2023 08:17:42 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C7C25AD7; Wed, 18 Jan 2023 08:18:24 -0800 (PST) Received: from [10.1.196.21] (e125579.cambridge.arm.com [10.1.196.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id D4F963F67D; Wed, 18 Jan 2023 08:17:40 -0800 (PST) Message-ID: <69457060-ede6-c805-af1d-a6e2b05fd55e@arm.com> Date: Wed, 18 Jan 2023 16:17:31 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v3] sched/fair: unlink misfit task from cpu overutilized Content-Language: en-US To: Qais Yousef Cc: Vincent Guittot , mingo@kernel.org, peterz@infradead.org, rafael@kernel.org, viresh.kumar@linaro.org, vschneid@redhat.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, lukasz.luba@arm.com, wvw@google.com, xuewen.yan94@gmail.com, han.lin@mediatek.com, Jonathan.JMChen@mediatek.com References: <20230113134056.257691-1-vincent.guittot@linaro.org> <78bf2d91-0076-f748-7c6a-530dad466787@arm.com> <20230117163841.d5jv6ysqf5kmvvmh@airbuntu> From: Dietmar Eggemann In-Reply-To: <20230117163841.d5jv6ysqf5kmvvmh@airbuntu> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 17/01/2023 16:38, Qais Yousef wrote: > On 01/16/23 09:07, Dietmar Eggemann wrote: > > [...] > >> Not sure if people get what `performance requirements` mean here? I know >> we want to use `performance` rather `bandwidth hint` to describe what >> uclamp is. So shouldn't we use `utilization but also uclamp`? > > We do have the uclamp doc now which explains this, no? I'm not keen on > utilization because it's an overloaded term. In the context of uclamp And `performance` isn't ? ;-) True, the doc refers to uclamp as a `performance requirements`. > - utilization _signal_ in the scheduler is used to indicate performance > requirements of a workload, no? I was referring to: 4569 static inline int task_fits_cpu(struct task_struct *p, int cpu) 4570 { 4571 unsigned long uclamp_min = uclamp_eff_value(p, UCLAMP_MIN); 4572 unsigned long uclamp_max = uclamp_eff_value(p, UCLAMP_MAX); 4573 unsigned long util = task_util_est(p); 4574 /* 4575 * Return true only if the cpu fully fits the task requirements, 4576 * which include the utilization but also the performance. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 4577 */ 4578 return (util_fits_cpu(util, uclamp_min, uclamp_max, cpu) > 0); 4579 } So here we explicitly talk about `utilization` (util_avg/util_est) versus `uclamp (max/min)` and the latter is referred as `performance`. You're right, we shouldn't refer to `uclamp (min/max)` as `utilization` either. In other places we use: select_idle_capacity() /* This CPU fits with all capacity and performance requirements */ ^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ `capacity` is probably equal `utilization`? and `performance requirements` stand for `uclamp (min/max)`. /* Only the min performance (i.e. uclamp_min) doesn't fit */ ^^^^^^^^^^^^^^^ here we link `min performance` explicitly to `uclamp_min`. /* Look for the CPU with highest performance capacity. ^^^^^^^^^^^^^^^^^^^^ I guess this stands for `cap_orig - thermal_load_avg()` feec() /* Both don't fit performance (i.e. uclamp_min) but best energy cpu has ^^^^^^^^^^^ ^^^^^^^^^^^^^^^ better performance. */ ^^^^^^ ^^^^^^^^^^^ Here I assume `better performance` stands for higher `cap_orig - thermal_pressure', not for `uclamp min or max`? --- IMHO, referring to `uclamp (min/max)` as `performance (min/max) hint/(requirement)` is fine as long as it's done consistently in comments and the alias is not used for other items. > > Using 'uclamp hint' if you found it really confusing, is fine by me. But I'd > rather steer away from 'bandwidth' or 'utilization' when describing uclamp and > its intention. > > I like using performance requirements because it enforces what this hint > actually means.