From nobody Wed Feb 11 05:22:48 2026 Received: from sender-of-o51.zoho.eu (sender-of-o51.zoho.eu [136.143.169.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6538148304 for ; Wed, 3 Apr 2024 13:28:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150942; cv=pass; b=FL46sHDkW1oxq9XrzOC9dAPMoztCxFdUcl4kimGS5I/qc2AS1xP5DFHxpFpXV1vcxET8YMn7XLbRQSFYDE+WgSNIQ4vdwPLLOIYJw4u3Mxgc3+eaSvZkGbvZm/+H0ExtNJDhA2EJxC9WlE5/UHaKU+Y9QvM6vAnh2bpg4blsnls= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150942; c=relaxed/simple; bh=HcKHy8drIWWvkpQQVFm+9+fLns3UQuLQqoF0UVMhQIE=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Y537Xmiv9gT56fmh+Vj8lK20KFMuYL+Wc/2lmdufygU1brDjERf5A2ZYMbVm6OUNTY7QP3PYPkjKxH2vL3cHkqwzzobx/lMG7jqcmKQm3cal3BAYAoTdh8LbpHbuCmiBw2XbmtRgxQj+NWt76vDgbxnsYHujYUIdxxj+5Pvnf4c= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bursov.com; spf=pass smtp.mailfrom=bursov.com; dkim=pass (1024-bit key) header.d=bursov.com header.i=vitaly@bursov.com header.b=OcfzIyBT; arc=pass smtp.client-ip=136.143.169.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bursov.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bursov.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=bursov.com header.i=vitaly@bursov.com header.b="OcfzIyBT" ARC-Seal: i=1; a=rsa-sha256; t=1712150902; cv=none; d=zohomail.eu; s=zohoarc; b=SPMB/Giio3mfF5QAJGU14AsrhM6oafxTQIJo4EFCqEu53BlnDVH0tFxLY3gXXucWgRXi9YlOZuHurfLtLP3Qhyq9o/GXH4ZbsYx6bc12Q+uOXA4BvvjIWaxxmYMGVazVBz7jeaVJ0POy9D9+8Eh3cZK74yPznmZeINsFLhisgRQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1712150902; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=qzgY0Cl/6ChalgCgdaGF+ngKcH92TjAXnthTIYJSWZQ=; b=JyuZBSqHQCyJVNScg15n0/IHdKJ5FVOfNduwagIUNFs69RDDTFrtqRa8K0Qux9d19s4wlIQSimAEPV7cpB+qixVApOIA1soeiTwZwB7gMbPo/V8PCJ7iUnwxWecpRipaals3aIvk4cm89Go7opeYdpBJW2wh3i18esFohdvjGCk= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=bursov.com; spf=pass smtp.mailfrom=vitaly@bursov.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1712150902; s=zoho; d=bursov.com; i=vitaly@bursov.com; h=From:From:To:To:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To:Cc; bh=qzgY0Cl/6ChalgCgdaGF+ngKcH92TjAXnthTIYJSWZQ=; b=OcfzIyBT9ePXxKkhfx4V2dSG/nD8IAdOKRgyHIY3QsGJTAqavBL/uqPHKUnSDeVN W4stnV4Hq13tNTC9sPnZWPrEfXyFxyTq94NliXcQXINwqQSZcyU4UTlWnrp2xZwMu6f i8dUttTdyM6QfwHkq1USekg3/1RCwUui9IVtMdI0= Received: from localhost.localdomain (217.20.170.230 [217.20.170.230]) by mx.zoho.eu with SMTPS id 1712150900004593.1479613998665; Wed, 3 Apr 2024 15:28:20 +0200 (CEST) From: Vitalii Bursov To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Vitalii Bursov Subject: [PATCH v3 1/3] sched/fair: allow disabling sched_balance_newidle with sched_relax_domain_level Date: Wed, 3 Apr 2024 16:28:04 +0300 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Change relax_domain_level checks so that it would be possible to include or exclude all domains from newidle balancing. This matches the behavior described in the documentation: -1 no request. use system default or follow request of others. 0 no search. 1 search siblings (hyperthreads in a core). "2" enables levels 0 and 1, level_max excludes the last (level_max) level, and level_max+1 includes all levels. Fixes: 9ae7ab20b483 ("sched/topology: Don't set SD_BALANCE_WAKE on cpuset d= omain relax") Signed-off-by: Vitalii Bursov Reviewed-by: Vincent Guittot Tested-by: Dietmar Eggemann --- kernel/cgroup/cpuset.c | 2 +- kernel/sched/topology.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c index 4237c8748715..da24187c4e02 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2948,7 +2948,7 @@ bool current_cpuset_is_being_rebound(void) static int update_relax_domain_level(struct cpuset *cs, s64 val) { #ifdef CONFIG_SMP - if (val < -1 || val >=3D sched_domain_level_max) + if (val < -1 || val > sched_domain_level_max + 1) return -EINVAL; #endif =20 diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c index 63aecd2a7a9f..67a777b31743 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c @@ -1475,7 +1475,7 @@ static void set_domain_attribute(struct sched_domain = *sd, } else request =3D attr->relax_domain_level; =20 - if (sd->level > request) { + if (sd->level >=3D request) { /* Turn off idle balance on this domain: */ sd->flags &=3D ~(SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE); } --=20 2.20.1 From nobody Wed Feb 11 05:22:48 2026 Received: from sender-of-o51.zoho.eu (sender-of-o51.zoho.eu [136.143.169.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CAFA147C8C for ; Wed, 3 Apr 2024 13:28:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150939; cv=pass; b=r/uJewssxmx1GfDvpVSPQnayMoUZma12rFdGeEyOOC4JHl8uGoTdaHpGsdBEdwiIRXnQyioTuO0LuAZpoZdBKOBJiOahh5Bl39ccmzbUo/tbYkEffJxwSpuVmap2koED4BPo1fi+lenBsEXjz80ULYK+wHQbBjKLuUSetwo+lAY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150939; c=relaxed/simple; bh=HFBn8Va2EJRRaykJqU54uJ2V9festAwLtakbcR7l1cc=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=O0LzhTryOz/48X69iytx6LciS28decURUdaVA8nduCeFk+zFambuWzkF/PA8sMMklaNa6Z+Uf0F9xbGvsua9S5JWAnUn037sGYwDUvgoZu5SLgy/4AMMwHkm2Ehvx7XXLptToGPsetP1O0jxhv/Jf5AvoPtkfuvMCdYqkUTmemA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bursov.com; spf=pass smtp.mailfrom=bursov.com; dkim=pass (1024-bit key) header.d=bursov.com header.i=vitaly@bursov.com header.b=MNYYXbv/; arc=pass smtp.client-ip=136.143.169.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bursov.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bursov.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=bursov.com header.i=vitaly@bursov.com header.b="MNYYXbv/" ARC-Seal: i=1; a=rsa-sha256; t=1712150904; cv=none; d=zohomail.eu; s=zohoarc; b=aWIrxTIW7F6b/pJERf47VnpgMm7j3CkLlArVoHatESuRZVQZvkzuJ9I2m/WXzli2OYuHP3ItVzuXX9gBmQMXzILK4ElaD6E8DhOnIJ6B9yLHVfAtYE+JKzaOEJYaUZdgA4geGyP7GbO8GLY0hB3KDq/rhKE2oXCPb0jAw2Ar+A4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1712150904; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=/G/nzSQ7kdwKRJT389pLw6gQqAhf/jq7kfm0Q/TR32c=; b=Zl4CShTyJvq9plfA9Iz05KG+EPExeC3wNRm9y0EZ6Ef7LeGo1CpWovzygoJTPXNlSaJf7bxeelaUYfm225RRqhF7ADTnEKy0RmgqAtE8Mu7O2EDOhEtEUjHm1bgBCb9zbNZTakl/4VRH+AaYhPemgNiQuzbBJ9eLW6CJpBHJjwA= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=bursov.com; spf=pass smtp.mailfrom=vitaly@bursov.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1712150904; s=zoho; d=bursov.com; i=vitaly@bursov.com; h=From:From:To:To:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To:Cc; bh=/G/nzSQ7kdwKRJT389pLw6gQqAhf/jq7kfm0Q/TR32c=; b=MNYYXbv/+MsnMTJuH2ezJ3BYpD9EcldGsHFsx7cc6GKxoa2kXWyatuLluzAVkPty arJFwflOZOiVxTo6PSJy+xg3A65yWU6Ahi7DcLmWkKhYMS6AE2FnZIPWQSnRmpP+kh/ RvShgoHzNT6/raTj07xMc53zXN7PVwetPyRyfPq4= Received: from localhost.localdomain (217.20.170.230 [217.20.170.230]) by mx.zoho.eu with SMTPS id 1712150902076254.87269508142435; Wed, 3 Apr 2024 15:28:22 +0200 (CEST) From: Vitalii Bursov To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Vitalii Bursov Subject: [PATCH v3 2/3] sched/debug: dump domains' level Date: Wed, 3 Apr 2024 16:28:05 +0300 Message-Id: X-Mailer: git-send-email 2.39.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Knowing domain's level exactly can be useful when setting relax_domain_level or cpuset.sched_relax_domain_level Usage: cat /debug/sched/domains/cpu0/domain1/level to dump cpu0 domain1's level. Signed-off-by: Vitalii Bursov Acked-by: Vincent Guittot Tested-by: Dietmar Eggemann --- kernel/sched/debug.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 8d5d98a5834d..c1eb9a1afd13 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -425,6 +425,7 @@ static void register_sd(struct sched_domain *sd, struct= dentry *parent) =20 debugfs_create_file("flags", 0444, parent, &sd->flags, &sd_flags_fops); debugfs_create_file("groups_flags", 0444, parent, &sd->groups->flags, &sd= _flags_fops); + debugfs_create_u32("level", 0444, parent, (u32 *)&sd->level); } =20 void update_sched_domain_debugfs(void) --=20 2.20.1 From nobody Wed Feb 11 05:22:48 2026 Received: from sender-of-o51.zoho.eu (sender-of-o51.zoho.eu [136.143.169.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1CAB9147C6C for ; Wed, 3 Apr 2024 13:28:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=136.143.169.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150939; cv=pass; b=EUcrrlJSuIs/jUYnf7D7D1ieMFVZLOmtJoti2L2ACssqoV8y4AwZLnRTI8i5e5trbiTfR0Yemqo9KtxGxbw2F3Fd6NR6GB/rCfwu10/woo6XdrkikP6k2R7OYZeM82rZEa7QYaY5XhSR4G7CowRzF/HOScbwuT+Kugu2nytawVs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712150939; c=relaxed/simple; bh=ep/aM4UQ3Rc0khxGhp+4Y6RB4Pmta9qCzL1Sw7BBg58=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oQgiKs18xQdzcvRQrMIJHSMG8HN7+U/M0bvwy0i1EJ5fkZzMZPoE4X6fFNNG8NKxZ06ooTVLpVTVz14X1ZM6+BUSW6aUGimT5ZN4+JYicLvAd/L6XH7hl1APuor9MMOxCmBXQ9+9emB6khJd5zekOMlsVdMUpcVnlmfnBm0LtSE= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bursov.com; spf=pass smtp.mailfrom=bursov.com; dkim=pass (1024-bit key) header.d=bursov.com header.i=vitaly@bursov.com header.b=pVzb4WxW; arc=pass smtp.client-ip=136.143.169.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=bursov.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bursov.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=bursov.com header.i=vitaly@bursov.com header.b="pVzb4WxW" ARC-Seal: i=1; a=rsa-sha256; t=1712150904; cv=none; d=zohomail.eu; s=zohoarc; b=YCKW4ozBe+xoPJkaMBl33Oj47iCQ+t/fIVOyJwgc0uM8krcOSGvl1Ecq/rjopIivL+CAmkEt4NYFavrRJ2MIbzX2Y5WTez58srTlsv8g+MtgfYHyAtIzQ7P+HgKgqNuwCPRH3Quclj6hhyCf2kJNkgnEfbTlgjh1pEKlCK2m4zw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1712150904; h=Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=9bXuIj+PDKqj9scGTWjOC6w1rao7BU1VlWs7XoTLDO4=; b=SCw5CPb1LGYOBadJ+eXpoftbvwjHOZO+5ZyfrlloX3sgc7f+54vAlFDHtiMMVCE3NYLcJiGTTJfrHj96hR+FPCSiD43iM9kZWFz3ZyK1SMRzWyUSTgujmhcksM9pSAYVH3bOlgezCsInbBpvnw7H7G3UxIIynoJFG9egkW3/wZE= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=bursov.com; spf=pass smtp.mailfrom=vitaly@bursov.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1712150904; s=zoho; d=bursov.com; i=vitaly@bursov.com; h=From:From:To:To:Subject:Subject:Date:Date:Message-Id:Message-Id:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Reply-To:Cc; bh=9bXuIj+PDKqj9scGTWjOC6w1rao7BU1VlWs7XoTLDO4=; b=pVzb4WxWijJ9GMxajmDOadze1n5ulI/o2i4dJEj8yskoVWS0+vES3rDa//L6Qk+3 wWqpmF8VJ/X3/8//zI5rnSn1nllD/WSLQSMWB3J5zDGNMCtwrkXyWmM8vDhlKpCmbvj BsguMiQAr3cfhcSVTCqqjFHamEwLTO4chxSSE6/0= Received: from localhost.localdomain (217.20.170.230 [217.20.170.230]) by mx.zoho.eu with SMTPS id 1712150903173220.99083567666742; Wed, 3 Apr 2024 15:28:23 +0200 (CEST) From: Vitalii Bursov To: Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Daniel Bristot de Oliveira , Valentin Schneider , linux-kernel@vger.kernel.org, Vitalii Bursov Subject: [PATCH v3 3/3] docs: cgroup-v1: clarify that domain levels are system-specific Date: Wed, 3 Apr 2024 16:28:06 +0300 Message-Id: <03b7979666088f8d55db301c6649e0c75c727d6e.1712147341.git.vitaly@bursov.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Content-Type: text/plain; charset="utf-8" Add a clarification that domain levels are system-specific and where to check for system details. Signed-off-by: Vitalii Bursov Acked-by: Vincent Guittot Reviewed-by: Valentin Schneider Tested-by: Dietmar Eggemann --- Documentation/admin-guide/cgroup-v1/cpusets.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/cgroup-v1/cpusets.rst b/Documentatio= n/admin-guide/cgroup-v1/cpusets.rst index 7d3415eea05d..f401af5e2f09 100644 --- a/Documentation/admin-guide/cgroup-v1/cpusets.rst +++ b/Documentation/admin-guide/cgroup-v1/cpusets.rst @@ -568,7 +568,7 @@ on the next tick. For some applications in special sit= uation, waiting =20 The 'cpuset.sched_relax_domain_level' file allows you to request changing this searching range as you like. This file takes int value which -indicates size of searching range in levels ideally as follows, +indicates size of searching range in levels approximately as follows, otherwise initial value -1 that indicates the cpuset has no request. =20 =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D @@ -581,6 +581,11 @@ otherwise initial value -1 that indicates the cpuset h= as no request. 5 search system wide [on NUMA system] =3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =20 +Not all levels can be present and values can change depending on the +system architecture and kernel configuration. Check +/sys/kernel/debug/sched/domains/cpu*/domain*/ for system-specific +details. + The system default is architecture dependent. The system default can be changed using the relax_domain_level=3D boot parameter. =20 --=20 2.20.1