From: Ridong Chen <ridong.chen@linux.dev>
To: "Waiman Long" <longman@redhat.com>, "Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Shuah Khan" <shuah@kernel.org>
Cc: Ridong Chen <ridong.chen@linux.dev>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org, Sashiko <sashiko-bot@kernel.org>,
Guopeng Zhang <zhangguopeng@kylinos.cn>,
Ridong Chen <chenridong@xiaomi.com>
Subject: [PATCH 0/4] cpuset: preparatory fixes and cleanups for partition rework
Date: Thu, 5 Nov 2026 20:52:11 +0800 [thread overview]
Message-ID: <20261105125215.2205892-1-ridong.chen@linux.dev> (raw)
From: Ridong Chen <chenridong@xiaomi.com>
This is the first part of the cpuset local partition rework posted as
RFC v4 [1]. The rework is split into three parts to make it easier to
review and merge:
1) fixes and preparatory cleanups (this series);
2) introduce partition_enable/disable/update() and rework the local
partition code on top of them;
3) clean up the remaining partition state handling outside these
helpers.
Patch 1 is a fix for an existing bug, found while looking into a review
comment on RFC v4: when cpuset.cpus.exclusive of an already invalid
partition root is cleared, its effective_xcpus is not reset, so its
former exclusive CPUs can't be claimed by a sibling. A test case is
added for it.
Patches 2-4 are the first three patches of RFC v4, rebased onto
next-20261104:
2) add an early empty cpumask check in partition_xcpus_add/del(), so
callers don't need to check it;
3) settle the isolation state of CPUs given back to the parent in
partition_xcpus_del(), so isolated_cpus_release() can be removed;
4) generalize validate_partition() so it can be used for both local
and remote partitions.
All patches build on their own, and test_cpuset_prs.sh passes with
this series applied.
[1] https://lore.kernel.org/all/20261101114206.2434398-1-ridong.chen@linux.dev/
Changes since RFC v4:
- New patch 1 to fix the invalid partition effective_xcpus reset.
- Patch 3: only settle the isolation state of the CPUs still owned by
the parent when invalidating a child partition in
compute_partition_effective_cpumask(), as the parent may be shrunk
and not updated yet. This code is removed later in the rework.
- Rebase onto next-20261104, which includes commit 362212853cd0
("cgroup/cpuset: Fix incorrect CPU accounting with parent's effective_xcpus expansion").
Chen Ridong (2):
cpuset: add early empty cpumask check in partition_xcpus_add/del
cpuset: generalize the validate_partition() interface
Ridong Chen (2):
cgroup/cpuset: Reset partition data when an invalid partition stays
invalid
cpuset: settle isolation state when CPUs are given back to parent
kernel/cgroup/cpuset.c | 211 +++++++-----------
.../selftests/cgroup/test_cpuset_prs.sh | 4 +
2 files changed, 89 insertions(+), 126 deletions(-)
base-commit: 8b7179210b22f8e48a82c5ceacb9d56a9c4cfec4
--
2.34.1
next reply other threads:[~2026-11-05 12:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 12:52 Ridong Chen [this message]
2026-11-05 12:52 ` [PATCH 1/4] cgroup/cpuset: Reset partition data when an invalid partition stays invalid Ridong Chen
2026-11-05 12:52 ` [PATCH 2/4] cpuset: add early empty cpumask check in partition_xcpus_add/del Ridong Chen
2026-11-05 12:52 ` [PATCH 3/4] cpuset: settle isolation state when CPUs are given back to parent Ridong Chen
2026-11-05 12:52 ` [PATCH 4/4] cpuset: generalize the validate_partition() interface Ridong Chen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261105125215.2205892-1-ridong.chen@linux.dev \
--to=ridong.chen@linux.dev \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@xiaomi.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=longman@redhat.com \
--cc=mkoutny@suse.com \
--cc=sashiko-bot@kernel.org \
--cc=shuah@kernel.org \
--cc=tj@kernel.org \
--cc=zhangguopeng@kylinos.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®