mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] cgroup/cpuset: Keep the top scheduling domain populated
@ 2026-11-11 13:42 Guopeng Zhang
  2026-11-11 13:42 ` [PATCH v4 1/2] cgroup/cpuset: Keep an active housekeeping CPU in the top sched domain Guopeng Zhang
  2026-11-11 13:42 ` [PATCH v4 2/2] selftests/cgroup: Add tests for top sched domain housekeeping checks Guopeng Zhang
  0 siblings, 2 replies; 3+ messages in thread
From: Guopeng Zhang @ 2026-11-11 13:42 UTC (permalink / raw)
  To: longman, ridong.chen
  Cc: cgroups, tj, hannes, mkoutny, shuah, mathieu.desnoyers,
	linux-kernel, linux-kselftest, Guopeng Zhang

From: Guopeng Zhang <zhangguopeng@kylinos.cn>

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/20261110050324.173461-1-guopeng.zhang@linux.dev/

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/20261107120100.3587595-4-ridong.chen@linux.dev/

  v2: https://lore.kernel.org/all/20261105130344.664336-1-guopeng.zhang@linux.dev/

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/20261104071600.474587-1-guopeng.zhang@linux.dev/

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
-- 
2.43.0


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

end of thread, other threads:[~2026-11-11 13:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-11 13:42 [PATCH v4 0/2] cgroup/cpuset: Keep the top scheduling domain populated Guopeng Zhang
2026-11-11 13:42 ` [PATCH v4 1/2] cgroup/cpuset: Keep an active housekeeping CPU in the top sched domain Guopeng Zhang
2026-11-11 13:42 ` [PATCH v4 2/2] selftests/cgroup: Add tests for top sched domain housekeeping checks Guopeng Zhang

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®