Linux cgroups development
 help / color / mirror / Atom feed
* [PATCH 0/4] cpuset: preparatory fixes and cleanups for partition rework
@ 2026-11-05 12:52 Ridong Chen
  2026-11-05 12:52 ` [PATCH 1/4] cgroup/cpuset: Reset partition data when an invalid partition stays invalid Ridong Chen
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ridong Chen @ 2026-11-05 12:52 UTC (permalink / raw)
  To: Waiman Long, Tejun Heo, Johannes Weiner, Michal Koutný,
	Shuah Khan
  Cc: Ridong Chen, cgroups, linux-kernel, linux-kselftest, Sashiko,
	Guopeng Zhang, Ridong Chen

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-05 12:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-05 12:52 [PATCH 0/4] cpuset: preparatory fixes and cleanups for partition rework Ridong Chen
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox