From nobody Thu Sep 24 17:47:35 2026 Received: from mta1.migadu.com (out-205.mta1.migadu.com [95.215.58.205]) (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 D8C913BC668 for ; Tue, 22 Sep 2026 03:22:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.205 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790047346; cv=none; b=sIKUugz8RW5aKkARsul80tgFDKB13z3WvSB5R/50zUpfi3ZL/cAsIjDDoSbRnFIlnB+kV57faBsuI8UzutBa0mk/mFZmcmlTfoeMfW99VyS4ZC2b7Y/qUFtUG3bBiO9UMzIUHkW8M/jb14JxU2udlLcGR951N0qmfncO+LKN8zw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790047346; c=relaxed/simple; bh=pauak53psAXKLYl2w6xPdGBF4uRbBTPOApr/KH0j4F0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DVb7YljdYOM1I9bFolyrYAESPUhUWhtvCyiRGQvWgx04KVJAj+p2MvGI92ObcxLUh9e0hSnjD8+dpDmonfcP6amsmogO3RlaOP0XNXVmiai/3JE3KBlxiJ5Los2nMnNlAQLY25bYLxU9h+jycw1JTxHSYHTZmpfyj8K/htSRLSc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=C49OkL7L; arc=none smtp.client-ip=95.215.58.205 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="C49OkL7L" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=pauak53psAXKLYl2w6xPdGBF4uRbBTPOApr/KH0j4F0=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1790047342; v=1; x=1790652142; b=C49OkL7LFYddJEhZEUbvcbZ7weqRfBRST96EE5phGSn+Y4HpyVtwmBauz/6M93+u3U8P1zGx jogztmXF0UczPe6VC6xW4KiqW/+z+3kkd03OdZEe+bjJDFhrZBLTdDWAL0fwciqPoVkPsx0LWKh wvtSPaHaBstwm2iFC1DbVQ2s= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id ebad361c0570f0a0; Tue, 22 Sep 2026 03:22:22 +0000 X-Mizu-Trace-ID: ebad361c0570f0a0 X-Migadu-Flow: FLOW_OUT From: Guopeng Zhang To: Waiman Long , Ridong Chen Cc: Tejun Heo , Johannes Weiner , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Jonathan Corbet , Shuah Khan , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Guopeng Zhang Subject: [PATCH v2 1/2] docs: cgroup-v2: Describe boot-isolated CPUs in cpuset.cpus.isolated Date: Tue, 22 Sep 2026 11:21:29 +0800 Message-ID: <20260922032130.33777-2-guopeng.zhang@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260922032130.33777-1-guopeng.zhang@linux.dev> References: <20260922032130.33777-1-guopeng.zhang@linux.dev> 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 Content-Type: text/plain; charset="utf-8" From: Guopeng Zhang cpuset.cpus.isolated is documented as empty when no isolated partition exists. This is not true when CPUs are isolated at boot with isolcpus=3Ddomain. cpuset_init() adds those CPUs to the isolated mask, and isolcpus=3D uses domain isolation by default. They remain listed after a partition using them is released. Document the boot-isolated CPUs as well. Suggested-by: Ridong Chen Reviewed-by: Ridong Chen Signed-off-by: Guopeng Zhang --- Documentation/admin-guide/cgroup-v2.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-= guide/cgroup-v2.rst index 2ec582985b5b..18a01ce4c334 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -2626,8 +2626,9 @@ Cpuset Interface Files A read-only and root cgroup only multiple values file. =20 This file shows the set of all isolated CPUs used in existing - isolated partitions. It will be empty if no isolated partition - is created. + isolated partitions or isolated at boot time via the "domain" + flag of "isolcpus". The latter remain listed even after any + partition using them is released. =20 cpuset.cpus.partition A read-write single value file which exists on non-root --=20 2.43.0 From nobody Thu Sep 24 17:47:35 2026 Received: from mta1.migadu.com (out-211.mta1.migadu.com [95.215.58.211]) (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 17D213C13E3 for ; Tue, 22 Sep 2026 03:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.211 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790047351; cv=none; b=SPm5Zmqncku0TVDQ+q2e+CkgInP1Ur0Pna4q2Gh+zagtc2ByRmc9oP6lmh+TXqhggy8F9tuerg6H+vWK3c1krnDBHtMQ5dDsywTpLW/5kqpBt6HSbcLI3qn723NrAZSWhAuZLKRxohQJlQPsKuLGsRQReGMPeKugy9EodzS9cdk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790047351; c=relaxed/simple; bh=7JPshgisP/gZKt07zp73sn2ZgmhMnlsFZ1jh2Bjoutk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hunxFiwiXw4mSDZXQuPUNVxAvL0G8APUAucPEOVUu4UrrUKRxWn+HhPradlMlZ1Izz4YFG19UhWP6rxRiThij9BDHG9U9UnUPPAVRCqpMeEhqTGnKozXXYeycX/jBhBgWHnXa+K27/Hz8DRPCS6axIgqmz5RuToBA/J3iG+2SWw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=qbeh/PYn; arc=none smtp.client-ip=95.215.58.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="qbeh/PYn" X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=7JPshgisP/gZKt07zp73sn2ZgmhMnlsFZ1jh2Bjoutk=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1790047347; v=1; x=1790652147; b=qbeh/PYneXt/Z16/KO0X49SzL25xMr46LzdcaT+zpPhASXEJOiIhm/yJhpw8JvqkqwoJwodG 8TU1arKIF5Z2jo0jK7N4ykUxoJHyaXg6Qs9aEcWxTQ8JHtkEjjN3fWcvdvHZW4e3PtO51Gj7PCk SI95588ILYb0kQY/zla9e1tg= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 0ca956a7054bf7e0; Tue, 22 Sep 2026 03:22:26 +0000 X-Mizu-Trace-ID: 0ca956a7054bf7e0 X-Migadu-Flow: FLOW_OUT From: Guopeng Zhang To: Waiman Long , Ridong Chen Cc: Tejun Heo , Johannes Weiner , =?UTF-8?q?Michal=20Koutn=C3=BD?= , Jonathan Corbet , Shuah Khan , cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Guopeng Zhang Subject: [PATCH v2 2/2] docs: cgroup-v2: Describe effective CPUs of partition roots Date: Tue, 22 Sep 2026 11:21:30 +0800 Message-ID: <20260922032130.33777-3-guopeng.zhang@linux.dev> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260922032130.33777-1-guopeng.zhang@linux.dev> References: <20260922032130.33777-1-guopeng.zhang@linux.dev> 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 Content-Type: text/plain; charset="utf-8" From: Guopeng Zhang The cpuset.cpus.effective description says that the effective CPUs are granted by the parent and are normally a subset of cpuset.cpus. This does not always hold for a valid non-root partition root. Its effective CPUs are the active CPUs in cpuset.cpus.exclusive.effective after CPUs assigned to valid child partition roots are removed. If cpuset.cpus.exclusive differs from cpuset.cpus, the effective CPUs may therefore be outside cpuset.cpus. Remote partitions also do not necessarily get their CPUs from their immediate parent. Suggested-by: Ridong Chen Signed-off-by: Guopeng Zhang Reviewed-by: Ridong Chen --- Documentation/admin-guide/cgroup-v2.rst | 56 ++++++++++++++++++++----- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/Documentation/admin-guide/cgroup-v2.rst b/Documentation/admin-= guide/cgroup-v2.rst index 18a01ce4c334..d21bbae3312a 100644 --- a/Documentation/admin-guide/cgroup-v2.rst +++ b/Documentation/admin-guide/cgroup-v2.rst @@ -2505,16 +2505,52 @@ Cpuset Interface Files A read-only multiple values file which exists on all cpuset-enabled cgroups. =20 - It lists the onlined CPUs that are actually granted to this - cgroup by its parent. These CPUs are allowed to be used by - tasks within the current cgroup. - - If "cpuset.cpus" is empty, the "cpuset.cpus.effective" file shows - all the CPUs from the parent cgroup that can be available to - be used by this cgroup. Otherwise, it should be a subset of - "cpuset.cpus" unless none of the CPUs listed in "cpuset.cpus" - can be granted. In this case, it will be treated just like an - empty "cpuset.cpus". + It lists the active CPUs available to tasks in this cgroup. + + For a cgroup that is not a valid partition root, an empty + "cpuset.cpus" makes "cpuset.cpus.effective" show all CPUs + available from the parent cgroup. Otherwise, it is a subset + of "cpuset.cpus" unless none of the requested CPUs can be + granted. In that case, it is treated like an empty + "cpuset.cpus". + + For example:: + + P (cpuset.cpus.effective=3D0-3) + | + +-- C0 (member): cpuset.cpus=3D1-2 + | cpuset.cpus.effective=3D1-2 + +-- C1 (invalid root): cpuset.cpus=3D4-5 + | cpuset.cpus.effective=3D0-3 + \-- C2 (member): cpuset.cpus=3D + cpuset.cpus.effective=3D0-3 + + C0 gets CPUs 1-2 because they are available from P. + None of C1's requested CPUs 4-5 are available from P, so C1 uses P's + effective CPUs 0-3 instead. + C2 has an empty "cpuset.cpus" and therefore also uses P's effective + CPUs 0-3. + + For a valid non-root partition root, "cpuset.cpus.effective" contains + the active CPUs from "cpuset.cpus.exclusive.effective" except + those granted to valid child partition roots. If + "cpuset.cpus.exclusive" is set to a value different from + "cpuset.cpus", the effective CPUs need not be a subset of + "cpuset.cpus". + + For example, if CPUs 2-5 are active, available, and not assigned + to a valid child partition root:: + + top (root) + | + \-- P (valid partition root) + cpuset.cpus=3D0-3 + cpuset.cpus.exclusive=3D2-5 + cpuset.cpus.exclusive.effective=3D2-5 + cpuset.cpus.effective=3D2-5 + + P has 2-5 in "cpuset.cpus.effective" even though its + "cpuset.cpus" is 0-3. =20 Its value will be affected by CPU hotplug events. =20 --=20 2.43.0