Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1135910rdd; Wed, 10 Jan 2024 09:36:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFymJX80Gg0aHnc47m9AMVDo1MW7YyUE8erKaC1UdrqiKz9BiSj1+/FDJib9Ap3G9BRvYb2 X-Received: by 2002:a17:907:982:b0:a26:c748:44e5 with SMTP id bf2-20020a170907098200b00a26c74844e5mr574649ejc.183.1704908175425; Wed, 10 Jan 2024 09:36:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704908175; cv=none; d=google.com; s=arc-20160816; b=jHQ+On63rSqqHNItg6cDaxfTiAIURMWeCcYI413i0Iu0HwOeX8YXmvQAz/ehqHcdqv YyIYxR8k7MjROxwa4C+WQAAxWCehQT0uOOkV03m0qKhYNwShaPoc2lWEQCCxYd9u54ei oPOh8OcNqm0OjJAQj8Oq3OADXxeB5SMuGEhVt4gotEEo6R1y6zBUAXPEHyWBsix1YYP9 jiRK4t4jmV4dMd9ACznWqiWgXD7kw1V+OSwQwQZ++uwXE7fABabzee/+mUKIRbrAznJ1 jRe2+0AT0S7y8X2+oZ/+iCEluVvfuHJheGxny0V0iSKWBM7gcDqLIre/GWyRu12jLCOy y4Yw== 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=Quxkd2kOtosd0xhGtW1MMtr97HwHYuSGHPI/EcetRCs=; fh=w3K2Ev1Lx5qucj3KtSJJgkYgwF53UGeTjuXSwrGLKtY=; b=qmGMlM/p/jmb26RHfrzgM6L65xw9fASDK6J9svN2y3WB1YUUTG0pE3YwUwrWTiECr5 38VJuSj8ZjTb6e/Icv1OeYS2v+UEUTZlPFBllZYpNJjKVmOWVS05HV07LsQO3VO50HOj 65OqcqqzvZKiyjtYSJVeGP6wNa+ZzDflN5fevdn2qG9cHf9V0mQgc9GCasO9tS07Dl4c z5fKqz21ousXVdSMddEj/7SzFhUG06YX/jBllrylmiQQ49j1Mz0rg/GuE2n0293JOTlI DC/mumAGYjCQ84scX6i0/M3YTAfoqgvWr8j/ptZAWEMie8j2SiX5xfYG2U57ntYTJgmu v74g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w+5XwlqQ; spf=pass (google.com: domain of linux-kernel+bounces-22533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id f23-20020a170906561700b00a2b0c83f4d6si1859522ejq.748.2024.01.10.09.36.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jan 2024 09:36:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-22533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=w+5XwlqQ; spf=pass (google.com: domain of linux-kernel+bounces-22533-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-22533-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 911031F28123 for ; Wed, 10 Jan 2024 17:26:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8DFBE4D12E; Wed, 10 Jan 2024 17:25:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="w+5XwlqQ" Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (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 476D34CB23 for ; Wed, 10 Jan 2024 17:25:28 +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-qk1-f170.google.com with SMTP id af79cd13be357-783182d4a09so452154885a.2 for ; Wed, 10 Jan 2024 09:25:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704907527; x=1705512327; 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=Quxkd2kOtosd0xhGtW1MMtr97HwHYuSGHPI/EcetRCs=; b=w+5XwlqQUyXYj8g2im0Pvn7grMhFHaJuYl2lDW30WjvLDoDv6GKpqBCwdb/Q6rko6g tpnM3ip31+jO5eTXCXfkFy4qxdx4/ileYONHc1zedL/xk/is3on/mqydJpx4GwaOcSOR gLPXo181lVYsfK8BlUXFS2y4FZoQiwEjGdculNHyohn7eake/rlseXEA7YsFi+6Cd3dg QGvF57QQNAZr422fYYfNe/ZlCitQ1kiDrEQjiqKKwElocmPmRzbu8CcwGBn/eKEZkamy gJsYkdxDknNBh8wzs32i6YR65qczVtKeaSKwMsMkDjrqCGHDdguo+ECaZ7A8iAIYaCbd WorQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704907527; x=1705512327; 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=Quxkd2kOtosd0xhGtW1MMtr97HwHYuSGHPI/EcetRCs=; b=VkP6oZoz9hN1m0C+WYbtbMsRNlQnXoKhFsH8kq5KbfRrZ72KqedVvSxjlwBv8BaY6L xc2liqKR/FDWEJzae98CSvJ+9XxhTjCFUoDld3hRyjoXAQOCV9Lr3E4c8mde1vjdD8E2 GX5OgiP65JpDYwABQIsurY89Q7yGbZhfs9Sh6e3E5H17unf6BEKvjke1LCTbRn8AOc28 Ma8lmIKE7p2xhKfRiAKo9BwXf21tAe/B4y+IKy1zIqxsn97wl4NoKXGj7kUj2cri2Xe4 hqVa3d2D4swOb3SJpxg/wJ+2+BlsmpirvO3UQf3yn6ig0SLWlBmzBua3eZxgxZ/LHuWG Effg== X-Gm-Message-State: AOJu0YzLdhX5fAQkS/e08oU7z012AtqFKGitftM85qIVXcm2DyrtQVAu SjVQdv12Sogezt4z0l/jhxhVr5ZKd0D+btPjrVibZGiNW3vr9A== X-Received: by 2002:a05:6214:c8b:b0:67f:7b95:a0f7 with SMTP id r11-20020a0562140c8b00b0067f7b95a0f7mr1704090qvr.91.1704907526838; Wed, 10 Jan 2024 09:25:26 -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> <92d1b906-6d76-4e96-a688-3a06a0a88508@arm.com> In-Reply-To: <92d1b906-6d76-4e96-a688-3a06a0a88508@arm.com> From: Vincent Guittot Date: Wed, 10 Jan 2024 18:25:15 +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 Wed, 10 Jan 2024 at 14:51, Dietmar Eggemann wrote: > > On 09/01/2024 15:30, Vincent Guittot wrote: > > 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 > > That's true. But with capacity_orig_of() for (1), we had some coherence > in the naming scheme of those cpu_capacity related functions (1) - (3). > which helps when trying to understand the code. > > I can see that actual_capacity_of() (2) sounds awful though. > > >> 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 > > Will the actual max compute capacity also depend on 'user space system > pressure' later, i.e. on 'permanent' frequency capping? yes it will > > > So (2) equals (1) minus temporary performance capping and (3) > > additionally subtracts the time used by other class to (2) > > OK. > > A coherent set of those tags even reflected in those getters would help > but can be done later too.