public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH/for-next v2 0/2] cgroup/cpuset: Fix partition related locking issues
@ 2026-01-30 15:42 Waiman Long
  2026-01-30 15:42 ` [PATCH/for-next v2 1/2] cgroup/cpuset: Defer housekeeping_update() call from CPU hotplug to workqueue Waiman Long
  2026-01-30 15:42 ` [PATCH/for-next v2 2/2] cgroup/cpuset: Introduce a new top level cpuset_top_mutex Waiman Long
  0 siblings, 2 replies; 23+ messages in thread
From: Waiman Long @ 2026-01-30 15:42 UTC (permalink / raw)
  To: Chen Ridong, Tejun Heo, Johannes Weiner, Michal Koutný,
	Ingo Molnar, Peter Zijlstra, Juri Lelli, Vincent Guittot,
	Steven Rostedt, Ben Segall, Mel Gorman, Valentin Schneider,
	Anna-Maria Behnsen, Frederic Weisbecker, Thomas Gleixner,
	Shuah Khan
  Cc: cgroups, linux-kernel, linux-kselftest, Waiman Long

 v2:
  - Change patch 1 to use workqueue instead of task run as it is a
    per-cpu kthread that performs the cpuset shutdown and bringup work.
  - Simplify and streamline some of the code.

After booting the latest cgroup for-next debug kernel with the latest
cgroup changes as well as Federic's "cpuset/isolation: Honour kthreads
preferred affinity" patch series [1] merged on top and running the
test-cpuset-prs.sh test, a circular locking dependency lockdep splat
was reported. See patch 2 for details.

The following changes are made to resolve this locking problem.
 1) Deferring calling housekeeping_update() from CPU hotplug to workqueue
 2) Release cpus_read_lock before calling housekeeping_update()

With these changes, the cpuset test ran to completion with no failure
and no lockdep splat.

[1] https://lore.kernel.org/lkml/20260125224541.50226-1-frederic@kernel.org/

Waiman Long (2):
  cgroup/cpuset: Defer housekeeping_update() call from CPU hotplug to
    workqueue
  cgroup/cpuset: Introduce a new top level cpuset_top_mutex

 kernel/cgroup/cpuset.c                        | 124 ++++++++++++++----
 kernel/sched/isolation.c                      |   4 +-
 kernel/time/timer_migration.c                 |   3 +-
 .../selftests/cgroup/test_cpuset_prs.sh       |  13 +-
 4 files changed, 107 insertions(+), 37 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-02-04 20:52 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-30 15:42 [PATCH/for-next v2 0/2] cgroup/cpuset: Fix partition related locking issues Waiman Long
2026-01-30 15:42 ` [PATCH/for-next v2 1/2] cgroup/cpuset: Defer housekeeping_update() call from CPU hotplug to workqueue Waiman Long
2026-01-31  0:47   ` Chen Ridong
2026-01-31  1:06     ` Waiman Long
2026-01-31  1:43       ` Chen Ridong
2026-01-31  1:49         ` Chen Ridong
2026-01-31  0:58   ` Chen Ridong
2026-01-31  1:45     ` Waiman Long
2026-01-31  2:05       ` Chen Ridong
2026-01-31 23:00         ` Waiman Long
2026-02-02  0:58           ` Chen Ridong
2026-02-02 13:05   ` Peter Zijlstra
2026-02-02 18:21     ` Waiman Long
2026-02-02 20:04       ` Peter Zijlstra
2026-02-02 20:06         ` Peter Zijlstra
2026-02-03  0:59           ` Waiman Long
2026-01-30 15:42 ` [PATCH/for-next v2 2/2] cgroup/cpuset: Introduce a new top level cpuset_top_mutex Waiman Long
2026-01-31  2:53   ` Chen Ridong
2026-01-31 23:13     ` Waiman Long
2026-02-02  1:11       ` Chen Ridong
2026-02-02 18:29         ` Waiman Long
2026-02-04  1:55           ` Chen Ridong
2026-02-04 20:52             ` Waiman Long

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