All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] cgroup/cpuset: Fix partition type transitions
@ 2026-08-28  9:56 Guopeng Zhang
  2026-08-28  9:56 ` [PATCH v2 1/6] cgroup/cpuset: Respect child CPU ownership in type changes Guopeng Zhang
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Guopeng Zhang @ 2026-08-28  9:56 UTC (permalink / raw)
  To: cgroups, longman, ridong.chen
  Cc: tj, hannes, mkoutny, shuah, linux-kernel, linux-kselftest,
	Guopeng Zhang

From: Guopeng Zhang <zhangguopeng@kylinos.cn>

Several partition type-change and validation paths use effective_xcpus,
which also includes CPUs assigned to valid child partitions. This can
change a child's isolation accounting, make a valid parent transition
fail housekeeping validation or invalidate a parent during a later
CPU-mask update.

Once type-change checks are limited to CPUs owned by the parent, a root
child can hold the last housekeeping CPU while its parent is isolated.
Returning that CPU when the child becomes a member must not consume the
last housekeeping CPU.

A type change that fails housekeeping validation can also leave CPUs
allocated to the invalid partition instead of returning them to the
partition which owns the invalidated subtree.

Use CPUs owned directly by a partition for type-change accounting and
validation. Recheck the housekeeping constraint when child CPUs return,
and release partition CPUs after failed type-change validation. Add
focused selftests for each case.

This is based on cgroup/for-7.3-fixes (87d347a8c854 "selftests/cgroup:
Add test for preserving boot-isolated CPUs").

Testing:
- Ran tools/testing/selftests/cgroup/test_cpuset_prs.sh with
  isolcpus=domain,15; all applicable tests passed.
- Ran the housekeeping CPU-return tests with
  nohz_full=1-14 isolcpus=domain,15; both cases passed.
- Ran targeted A/B tests covering child-owned CPU accounting and
  validation, housekeeping CPU return, and CPU release after local and
  remote type-change validation failures.

Changes in v2:
- split the type-transition fixes from the original series;
- merge the child-owned accounting and validation changes;
- validate trial CPU masks against CPUs owned directly by the partition;
- handle a root child returning the last housekeeping CPU, including
  nested isolated ancestors;
- use the common partition-disable path after type-change validation
  failure;
- initialize boot-isolated CPU data during selftest setup;
- split the accounting, child-owned validation and housekeeping-return
  tests.

Link: https://lore.kernel.org/all/20260820124202.517160-1-guopeng.zhang@linux.dev/

Guopeng Zhang (6):
  cgroup/cpuset: Respect child CPU ownership in type changes
  selftests/cgroup: Add tests for type-change isolation accounting
  selftests/cgroup: Add tests for type changes with child-owned CPUs
  selftests/cgroup: Add tests for housekeeping CPU return to isolated
    parents
  cgroup/cpuset: Release CPUs when type-change validation fails
  selftests/cgroup: Add CPU release tests for type-change validation
    failures

 kernel/cgroup/cpuset.c                        | 101 +++++-
 .../selftests/cgroup/test_cpuset_prs.sh       | 310 +++++++++++++++++-
 2 files changed, 398 insertions(+), 13 deletions(-)


base-commit: 87d347a8c8545a9234d1dd215023064413284c34
-- 
2.43.0

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

end of thread, other threads:[~2026-08-28  9:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-28  9:56 [PATCH v2 0/6] cgroup/cpuset: Fix partition type transitions Guopeng Zhang
2026-08-28  9:56 ` [PATCH v2 1/6] cgroup/cpuset: Respect child CPU ownership in type changes Guopeng Zhang
2026-08-28  9:56 ` [PATCH v2 2/6] selftests/cgroup: Add tests for type-change isolation accounting Guopeng Zhang
2026-08-28  9:56 ` [PATCH v2 3/6] selftests/cgroup: Add tests for type changes with child-owned CPUs Guopeng Zhang
2026-08-28  9:56 ` [PATCH v2 4/6] selftests/cgroup: Add tests for housekeeping CPU return to isolated parents Guopeng Zhang
2026-08-28  9:56 ` [PATCH v2 5/6] cgroup/cpuset: Release CPUs when type-change validation fails Guopeng Zhang
2026-08-28  9:56 ` [PATCH v2 6/6] selftests/cgroup: Add CPU release tests for type-change validation failures Guopeng Zhang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.