Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp360609rdd; Tue, 9 Jan 2024 06:32:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTV4KaVbYLtlL79UahVETUm9qUApa3PrByykekOSMzzwheWvPl1TXdkk4HvHxMLG9wHGpP X-Received: by 2002:a17:902:bb0f:b0:1d3:fb6e:f392 with SMTP id im15-20020a170902bb0f00b001d3fb6ef392mr5034923plb.14.1704810737339; Tue, 09 Jan 2024 06:32:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704810737; cv=none; d=google.com; s=arc-20160816; b=Gq090wx/hLryl9IYjhQcMd/x+NC4aRdRLA1YvQxqLW2H2/bJMAExVtSJbXV6PX+04R LJhCQOojSstaSVa3frOOaWRyR+CqG4sMMeDFZWsPzWcFriWLAAJw+Dbj0m4W5TMUSia9 8WbxcxaajXSXudpnKHcGQAXlYQtL9MhoOZF0bDGosVXaQUBMYruLyCgv/c4EDKPg9Llk ktpybndq9rLkzPM8JsV51Oab46FnKuB7IycI0FHl7FeRFTkWFJZuwZTpyPANDayATAjg lgUb/5kTr+tG8Yuu4HoyZk2C5YV4PlEbC9zz5N1JPTEly3BcN9ZLBHA8BxU1kl4Gr/Jq A+Bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=d3HXRcKDVxJPTXyXJSN6jduIbifNRx9OK443HIjFR3c=; fh=w3K2Ev1Lx5qucj3KtSJJgkYgwF53UGeTjuXSwrGLKtY=; b=hwBJ2DgO8Xb1IeJLCvZxyVWg6BDpd16comyNm0wEqbF+6a7iPD61EY/x4f8Sd97jMS gOemMRKiKH5ZnZ5hw+lFIlLWMar138Z1qBz4XBmNaflIvj8aZjJPO216DAfB82ot49CB DUEEpCvrXgDBehblY3Pd5Evxe/adF8QljD1agfgADKXaOvpVWtWv2c4Oqkz6MKijQsic Fodt4PNxgixiRZHF1mJxcCbIrbeJp+P0IOZ1giKswOwcC/zeYxxsU1nb19+rTKgDdwJ7 mAP7k3Nm0KjZ+ZuHTSFkZyfkNxnF90RQJ9gBbaug/q3WoUAKtharVrPFy4dKngMvpMV/ skWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uNCafcL3; spf=pass (google.com: domain of linux-kernel+bounces-20986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m3-20020a170902db0300b001d4868dc9fesi1554955plx.587.2024.01.09.06.32.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 06:32:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uNCafcL3; spf=pass (google.com: domain of linux-kernel+bounces-20986-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20986-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 65A48B24937 for ; Tue, 9 Jan 2024 14:31:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B23639AFC; Tue, 9 Jan 2024 14:31:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="uNCafcL3" Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 652031391 for ; Tue, 9 Jan 2024 14:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-5bdbe2de25fso2278710a12.3 for ; Tue, 09 Jan 2024 06:31:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704810663; x=1705415463; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=d3HXRcKDVxJPTXyXJSN6jduIbifNRx9OK443HIjFR3c=; b=uNCafcL3BbzriyQNRDfLPsysHiWA0xiGo1soCwY9H5k4/YXABvsNn+ch3oLKdxHBgK 0xBcwdCI6eDD283MK41rFiTEHJXGzx5f+8jTrBWF8PkvC1Y+SL9a6W9+ZNQ1qOqXtdrW zNdDa80CyA5jrt/2AGxZuKQKaX5RemiAcBm94SpDGmhRCws7DsPislkMFGy5FHBAGs8P EUa/k6CDUM8trkRKY5Yl7aqeGH9R4185NUbQeBNDOWFCGKl5ixOdukYr1d4IpITzZI/c +4hqgqluZEoRKpWh21xf8eW7r9gz+ECGdIpG9hDOoIhbM/YElNbORxQKTC9mH4Wh7rAo 8Dbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704810663; x=1705415463; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=d3HXRcKDVxJPTXyXJSN6jduIbifNRx9OK443HIjFR3c=; b=Ir/su4enrQ8+4/XgoI4gWU489MwpHCYmYgT93NdglSY7CLyVKo5vMo5lZUZXFOdmbg HNSgVJasdAr+9TA1w3LPBTClHahrbcZA02wVc1h00nmcKFLjNIb0/NsJz7BciIMp8385 sItU2BeDnAAviyjDDDb+Mxg4j87rAQ36p5J4r/BWsqT8Uj4FCSEoQbtqWPTWVH2BZMKI E8w8j959/svQlEvFykzDzs6FoyCQrIaSjT74MYl8xc4QAn+UgJ/u9qImUN+oCkQgoUXD zCJ7epghTvm9nve1S3cNvHXwrxj8WHPCIvPngVKXXQi7v9e8N67Hxfdu9i6Zyqcsehqt /EVQ== X-Gm-Message-State: AOJu0Yz2M/nnFtiPkyXRFzpml4iVBfb97pdTHsCmcssLG+6F3UXxu+LN AVZtOB+74sxdprZrmT6zkyir0Dr8BXrzGgwPoAyZMerbumPnRg== X-Received: by 2002:a17:90a:ea83:b0:28c:8ec9:6330 with SMTP id h3-20020a17090aea8300b0028c8ec96330mr3145262pjz.15.1704810662738; Tue, 09 Jan 2024 06:31:02 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240108134843.429769-1-vincent.guittot@linaro.org> <20240108134843.429769-3-vincent.guittot@linaro.org> In-Reply-To: From: Vincent Guittot Date: Tue, 9 Jan 2024 15:30:51 +0100 Message-ID: Subject: Re: [PATCH v3 2/5] sched: Take cpufreq feedback into account To: Dietmar Eggemann Cc: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, sudeep.holla@arm.com, rafael@kernel.org, viresh.kumar@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, lukasz.luba@arm.com, rui.zhang@intel.com, mhiramat@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, corbet@lwn.net, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org, qyousef@layalina.io Content-Type: text/plain; charset="UTF-8" On Tue, 9 Jan 2024 at 12:22, Dietmar Eggemann wrote: > > On 08/01/2024 14:48, Vincent Guittot wrote: > > Aggregate the different pressures applied on the capacity of CPUs and > > create a new function that returns the actual capacity of the CPU: > > get_actual_cpu_capacity() > > function name scaling > > (1) arch_scale_cpu_capacity() - uarch > > (2) get_actual_cpu_capacity() - hw + cpufreq/thermal of (1) > > (3) capacity_of() - rt (rt/dl/irq) of (2) (used by fair) > > Although (1) - (3) are very close to each other from the functional I don't get your point as name of (1) and (3) have not been changed by the patch > standpoint, their names are not very coherent. > > I assume this makes it hard to understand all of this when reading the > code w/o knowing these patches before. > > Why is (2) tagged with 'actual'? This is the actual max compute capacity of the cpu at now i.e. possibly reduced because of temporary frequency capping So (2) equals (1) minus temporary performance capping and (3) additionally subtracts the time used by other class to (2) > > This is especially visible in feec() where local variable cpu_cap > relates to (3) whereas cpu_actual_cap related to (2). > > [...] >