Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp323897rdd; Tue, 9 Jan 2024 05:30:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFNXu5NikiIjfpAwEsO8uZMs+W4aTVzf8ZmnPSePgiqsJHQD86qc4+0V/bpm8jZQA3Byfsd X-Received: by 2002:ae9:e207:0:b0:783:1939:ada with SMTP id c7-20020ae9e207000000b0078319390adamr5022003qkc.116.1704807014278; Tue, 09 Jan 2024 05:30:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704807014; cv=none; d=google.com; s=arc-20160816; b=Y84nUGTf+GfJmvWCk1KB8STEehVCzM/O6SHAhahsLmOmQN5p4gYwvCnJCzpReJV++F ST0nF1t1VcAXg0KFShz3BvPLO1u0MxXK6biTeg0A6/g1iY6qr+p9OzmqRhYX5vMs5IQH Ug82icYcVRi6clOgYSIwQwevC47AaL8GeDLeyFj2gkun8cHPjAM4pdEDnxx+54bl2cTm D8bRiqedFH64IP0HcR8yiZ/dWnvx7VfMFWszWduzXjG0aBcYBv6K8GZxvk0FvhZnItOU Wnijrh6gy3KjvycV2s+u28QLoBDiRop1HTpQnJYy9yZb7x2U7qoUzMXVAr50Z/fKIHH0 JETA== 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=pyLic9iO2i6kaJfam6/jRmyNsV6AuxuUVqN/iIKWdX0=; fh=w3K2Ev1Lx5qucj3KtSJJgkYgwF53UGeTjuXSwrGLKtY=; b=cXghR/rieNdF5PNTrfQiHn+5Ecf21zK+10o8xz2eRvwjBETFCpAi4NRywsj9mpO92e ijTCft+4Hos0fSL8AJBDVzdQ3hPURZPKH7MYogHQiBVaNclo4f/8eDFP5xbBq5BaBBoC ALyJVP6NxaiGTL2VHOUgReNKk8lPfZCAS7CeMZcj9PKM21fvxPLUVBSm+ZqPn1WO3EPm NokCFKNX51Akva+G+wMdPwx3DT18G96H/tCrimD019sqUFw7ighoH0QmQkkH1HhDLi5r djXzjcDc/WLvEHm25eQccOuYWkPUxPuTQz2BEe+ALO8sSVGm8RK5//0Tblr05rHerT5P +FuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MRs/bEWq"; spf=pass (google.com: domain of linux-kernel+bounces-20896-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20896-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m10-20020a05620a24ca00b007816c894164si2284415qkn.370.2024.01.09.05.30.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 05:30:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20896-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MRs/bEWq"; spf=pass (google.com: domain of linux-kernel+bounces-20896-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20896-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 4FB611C24496 for ; Tue, 9 Jan 2024 13:30:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D5A43985B; Tue, 9 Jan 2024 13:29:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MRs/bEWq" Received: from mail-pg1-f177.google.com (mail-pg1-f177.google.com [209.85.215.177]) (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 F386538F9E for ; Tue, 9 Jan 2024 13:29:42 +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-f177.google.com with SMTP id 41be03b00d2f7-53fa455cd94so928377a12.2 for ; Tue, 09 Jan 2024 05:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704806982; x=1705411782; 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=pyLic9iO2i6kaJfam6/jRmyNsV6AuxuUVqN/iIKWdX0=; b=MRs/bEWqCeNYQcFzZWjUBYDieSYSCVIVqyrXsBfD9AicV+JHblOI1PAfdJ8dvL5M4w rpX7/5KOQWTnw3f6t9UUbU5ZLu8vgTnIGxu+cyUI+msMtxppX2HLWi9eXqO45inqc1VG 1aftg+lU9EXJOm6IcvTHKZwfbQd2JkCVtDLDHlFrI+YejvRf89FdtziRNim5pKs1+NjQ ofXuvZQH3eQElAaVlLe7/4vbMv3qQ6nr7LsdJvb6mACSsu6MrDqx8c4PYOZV7AwlVnM8 ZT7vbx2f92uqtGrXcu2cKWvJxP2HaTYu2iQyI4r3hcainYDgGypheJRSMu9LVHeabfDT 0a3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704806982; x=1705411782; 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=pyLic9iO2i6kaJfam6/jRmyNsV6AuxuUVqN/iIKWdX0=; b=s+rEn3UnCo79KaHrk5fb2R73EZFkUBseNhs8VpVTNranlxubtt1i/pP0WIe1HeEOpQ tuvBrQ24bZYXtrgDvK1ZQCWIIBSsvEQaVPVGNS0725OyMDep2rb995sbD+Q4YgNHECsm fBhY8Ls66y3CzDiKpjSyezOnVblL7nuvL3ooVCwHnaPfIaGsXvG16UckDI8dcKhDe4Na CGRhM3Tus0NsLRRYcorZKSl5kTxBzGtquAz9mFMzJEr8kBoFnidmvuJDqKKbbIALHMoZ O7ZJlTeMkrcuej7VFklu5KYFgxNaRtUOT2YfiwvLPX3WqucbCX8l86+8peksoqmttcbT hiwA== X-Gm-Message-State: AOJu0Yx5bHgoyfG8tsveh1o7bfKX6PqlOxAwPwOIgegoIeoGVa5/3T6F Kn2oCG4XJGBMHnF1JGIu7J5jZYwjWI1ESRsoFBs8H143nBJSow== X-Received: by 2002:a17:90a:4701:b0:28c:3758:f38a with SMTP id h1-20020a17090a470100b0028c3758f38amr2341460pjg.5.1704806982158; Tue, 09 Jan 2024 05:29:42 -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> In-Reply-To: From: Vincent Guittot Date: Tue, 9 Jan 2024 14:29:31 +0100 Message-ID: Subject: Re: [PATCH v3 0/5] Rework system pressure interface to the scheduler 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:34, Dietmar Eggemann wrote: > > On 08/01/2024 14:48, Vincent Guittot wrote: > > Following the consolidation and cleanup of CPU capacity in [1], this serie > > reworks how the scheduler gets the pressures on CPUs. We need to take into > > account all pressures applied by cpufreq on the compute capacity of a CPU > > for dozens of ms or more and not only cpufreq cooling device or HW > > mitigiations. we split the pressure applied on CPU's capacity in 2 parts: > > - one from cpufreq and freq_qos > > - one from HW high freq mitigiation. > > > > The next step will be to add a dedicated interface for long standing > > capping of the CPU capacity (i.e. for seconds or more) like the > > scaling_max_freq of cpufreq sysfs. The latter is already taken into > > account by this serie but as a temporary pressure which is not always the > > best choice when we know that it will happen for seconds or more. > > I guess this is related to the 'user space system pressure' (*) slide of > your OSPM '23 talk. yes > > Where do you draw the line when it comes to time between (*) and the > 'medium pace system pressure' (e.g. thermal and FREQ_QOS). My goal is to consider the /sys/../scaling_max_freq as the 'user space system pressure' > > IIRC, with (*) you want to rebuild the sched domains etc. The easiest way would be to rebuild the sched_domain but the cost is not small so I would prefer to skip the rebuild and add a new signal that keep track on this capped capacity > > > > > [1] https://lore.kernel.org/lkml/20231211104855.558096-1-vincent.guittot@linaro.org/ > > > > Change since v1: > > - Rework cpufreq_update_pressure() > > > > Change since v1: > > - Use struct cpufreq_policy as parameter of cpufreq_update_pressure() > > - Fix typos and comments > > - Make sched_thermal_decay_shift boot param as deprecated > > > > Vincent Guittot (5): > > cpufreq: Add a cpufreq pressure feedback for the scheduler > > sched: Take cpufreq feedback into account > > thermal/cpufreq: Remove arch_update_thermal_pressure() > > sched: Rename arch_update_thermal_pressure into > > arch_update_hw_pressure > > sched/pelt: Remove shift of thermal clock > > > > .../admin-guide/kernel-parameters.txt | 1 + > > arch/arm/include/asm/topology.h | 6 +- > > arch/arm64/include/asm/topology.h | 6 +- > > drivers/base/arch_topology.c | 26 ++++---- > > drivers/cpufreq/cpufreq.c | 36 +++++++++++ > > drivers/cpufreq/qcom-cpufreq-hw.c | 4 +- > > drivers/thermal/cpufreq_cooling.c | 3 - > > include/linux/arch_topology.h | 8 +-- > > include/linux/cpufreq.h | 10 +++ > > include/linux/sched/topology.h | 8 +-- > > .../{thermal_pressure.h => hw_pressure.h} | 14 ++--- > > include/trace/events/sched.h | 2 +- > > init/Kconfig | 12 ++-- > > kernel/sched/core.c | 8 +-- > > kernel/sched/fair.c | 63 +++++++++---------- > > kernel/sched/pelt.c | 18 +++--- > > kernel/sched/pelt.h | 16 ++--- > > kernel/sched/sched.h | 22 +------ > > 18 files changed, 144 insertions(+), 119 deletions(-) > > rename include/trace/events/{thermal_pressure.h => hw_pressure.h} (55%) >