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/[email protected]/
Waiman Long (3):
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
kernel/cgroup/cpuset.c | 211 ++++++++++++++----
kernel/sched/isolation.c | 4 +-
kernel/time/timer_migration.c | 3 +-
.../selftests/cgroup/test_cpuset_prs.sh | 13 +-
4 files changed, 174 insertions(+), 57 deletions(-)
--
2.52.0