Skip to content

cgroup/cpuset: Keep the top scheduling domain populated

Guopeng Zhang cgroups linux-kselftest lkml 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 2 repliesIn review
  2. v33 patches 7 repliesSuperseded
  3. v23 patches 5 repliesSuperseded

Changes in v4 from the cover letter

Unify the CPU availability checks following Ridong's suggestion. Restrict returned CPUs to the parent's current exclusive grant, and retain the active housekeeping CPU guard during hotplug. Collect the kernel changes in patch 1 and selftests in patch 2, adding a regression for CPU replacement under a populated local parent. Update Ridong's email address as requested.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2cgroup/cpuset: Keep an active housekeeping CPU in the top sched domainkernel/cgroup/cpuset.c+70 -152 replies
2/2selftests/cgroup: Add tests for top sched domain housekeeping checkstools/testing/selftests/cgroup/test_cpuset_prs.sh+71 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v4 yet.

Read the v4 thread

Cover letter [PATCH v4 0/2] cgroup/cpuset: Keep the top scheduling domain populated

From: Guopeng Zhang <[email protected]>

Boot-isolated CPUs stay in top_cpuset.effective_cpus, but are excluded from its scheduling domain. Allocating all boot domain housekeeping CPUs to partitions can therefore leave the top scheduling domain empty, leading to warnings and an OOPS in build_perf_domains(). CPU hotplug can reach the same state.

Following Ridong's review, use one tasks_nocpu_error() check for all parents, with an explicit mask of CPUs returned by the update. This also allows CPU replacements under populated local parents. Hotplug passes no returned CPUs and preserves partitions unable to restore an active boot domain housekeeping CPU.

Patch 1 contains the complete kernel fix, including all caller updates. Patch 2 contains the selftests.

Changes since v3:
Unify the CPU availability checks following Ridong's suggestion. Restrict returned CPUs to the parent's current exclusive grant, and retain the active housekeeping CPU guard during hotplug. Collect the kernel changes in patch 1 and selftests in patch 2, adding a regression for CPU replacement under a populated local parent. Update Ridong's email address as requested.

v3: https://lore.kernel.org/all/[email protected]/

Changes since v2:
Keep patch 1's kernel changes unchanged. Update its selftests following Longman's and Sashiko's comments and cover recovery with a single top-level HK CPU. Add patch 2 to fix the CPU replacement rejection reported by Sashiko, with its own regression test. Update the hotplug fix, now patch 3, to avoid invalidating unrelated partitions, including partitions whose boot housekeeping CPUs are all offline. Drop v2's isolated CPU cleanup patch in favor of Ridong's fix:
https://lore.kernel.org/all/[email protected]/

v2: https://lore.kernel.org/all/[email protected]/

Changes since v1:
Rework the fix following Ridong's suggestion and add test cases. Add patch 2 for CPU hotplug and patch 3 for isolated CPU cleanup when the parent partition becomes invalid.

v1: https://lore.kernel.org/all/[email protected]/

Guopeng Zhang (2):
cgroup/cpuset: Keep an active housekeeping CPU in the top sched domain selftests/cgroup: Add tests for top sched domain housekeeping checks

 kernel/cgroup/cpuset.c                        | 85 +++++++++++++++----
 .../selftests/cgroup/test_cpuset_prs.sh       | 71 ++++++++++++++++
 2 files changed, 141 insertions(+), 15 deletions(-)

base-commit: 630059a5a632377b9b7b487baccde92b7ae1dd47

Signature · 1 line
2.43.0