public inbox for cgroups@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH/for-next v4 0/4] cgroup/cpuset: Fix partition related locking issues
@ 2026-02-06 20:37 Waiman Long
  2026-02-06 20:37 ` [PATCH/for-next v4 1/4] cgroup/cpuset: Clarify exclusion rules for cpuset internal variables Waiman Long
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Waiman Long @ 2026-02-06 20:37 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

 v4:
  - Fix various issues as reported by Chen Ridong.

 v3:
  - Add a new patch to clarify the locking rules for internal variables
  - Defer all housekeeping_update() calls with associated
    rebuild_sched_domains*() calls to either workqueue or task_work.

 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.

To fix this issue, a new top level cpuset_top_mutex is added and the
call to housekeeping_update() is deferred to either a task_work or to
a workqueue.

With these changes in place, 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 (4):
  cgroup/cpuset: Clarify exclusion rules for cpuset internal variables
  cgroup/cpuset: Defer housekeeping_update() calls from CPU hotplug to
    workqueue
  cgroup/cpuset: Call housekeeping_update() without holding
    cpus_read_lock
  cgroup/cpuset: Eliminate some duplicated rebuild_sched_domains() calls

 kernel/cgroup/cpuset.c                        | 241 +++++++++++++-----
 kernel/sched/isolation.c                      |   4 +-
 kernel/time/timer_migration.c                 |   4 +-
 .../selftests/cgroup/test_cpuset_prs.sh       |  13 +-
 4 files changed, 196 insertions(+), 66 deletions(-)

-- 
2.52.0


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

end of thread, other threads:[~2026-02-10 18:53 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 20:37 [PATCH/for-next v4 0/4] cgroup/cpuset: Fix partition related locking issues Waiman Long
2026-02-06 20:37 ` [PATCH/for-next v4 1/4] cgroup/cpuset: Clarify exclusion rules for cpuset internal variables Waiman Long
2026-02-09  3:41   ` Chen Ridong
2026-02-09 19:58     ` Waiman Long
2026-02-06 20:37 ` [PATCH/for-next v4 2/4] cgroup/cpuset: Defer housekeeping_update() calls from CPU hotplug to workqueue Waiman Long
2026-02-06 22:28   ` Frederic Weisbecker
2026-02-08  2:00     ` Waiman Long
2026-02-10 15:46       ` Frederic Weisbecker
2026-02-10 18:53         ` Waiman Long
2026-02-09  6:57   ` Chen Ridong
2026-02-06 20:37 ` [PATCH/for-next v4 3/4] cgroup/cpuset: Call housekeeping_update() without holding cpus_read_lock Waiman Long
2026-02-09  7:12   ` Chen Ridong
2026-02-09 20:29     ` Waiman Long
2026-02-10  1:29       ` Chen Ridong
2026-02-10 14:01         ` Waiman Long
2026-02-09  7:23   ` Chen Ridong
2026-02-09 20:20     ` Waiman Long
2026-02-10  1:39       ` Chen Ridong
2026-02-10 14:39         ` Waiman Long
2026-02-06 20:37 ` [PATCH/for-next v4 4/4] cgroup/cpuset: Eliminate some duplicated rebuild_sched_domains() calls Waiman Long
2026-02-09  7:53   ` Chen Ridong
2026-02-09 20:47     ` Waiman Long

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