[PATCH v2 00/12] Dynamic Housekeeping Management (DHM) via CPUSets

Qiliang Yuan
2026-04-13T07:43:28Z

This series introduces Dynamic Housekeeping Management (DHM) to the
Linux kernel.

Previously known as the DHEI (Dynamic Housekeeping Environment Interface)
patchset (RFC and v1), this series has been fundamentally refactored in
response to upstream feedback. The custom sysfs interface has been entirely
dropped. Instead, DHM is now natively integrated into the cgroup v2
cpuset controller.

By exposing `cpuset.housekeeping.cpus` on the root cgroup, system
administrators and workload orchestrators (like Kubernetes) can
dynamically update the kernel's global housekeeping masks at runtime,
without requiring a node reboot.

This version provides dynamic reconfiguration support for the following
subsystems:
- RCU (NOCB offloading)
- Tick/NOHZ (Full dynticks)
- Global Workqueues and Timers
- Managed Interrupts (genirq)
- Hardlockup Detectors (Watchdog)
- Scheduler Domains (Isolation)
- Memory Management (vmstat/lru_add_drain)
- Kthreads and Softirqs (Affinity)

Many thanks to the maintainers for the valuable guidance that led to this
significantly improved and upstream-aligned architecture.

To: Ingo Molnar <mingo@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
To: Juri Lelli <juri.lelli@redhat.com>
To: Vincent Guittot <vincent.guittot@linaro.org>
To: Dietmar Eggemann <dietmar.eggemann@arm.com>
To: Steven Rostedt <rostedt@goodmis.org>
To: Ben Segall <bsegall@google.com>
To: Mel Gorman <mgorman@suse.de>
To: Valentin Schneider <vschneid@redhat.com>
To: Paul E. McKenney <paulmck@kernel.org>
To: Frederic Weisbecker <frederic@kernel.org>
To: Neeraj Upadhyay <neeraj.upadhyay@kernel.org>
To: Joel Fernandes <joelagnelf@nvidia.com>
To: Josh Triplett <josh@joshtriplett.org>
To: Boqun Feng <boqun@kernel.org>
To: Uladzislau Rezki <urezki@gmail.com>
To: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>
To: Zqiang <qiang.zhang@linux.dev>
To: Anna-Maria Behnsen <anna-maria@linutronix.de>
To: Ingo Molnar <mingo@kernel.org>
To: Thomas Gleixner <tglx@kernel.org>
To: Tejun Heo <tj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
To: Vlastimil Babka <vbabka@kernel.org>
To: Suren Baghdasaryan <surenb@google.com>
To: Michal Hocko <mhocko@suse.com>
To: Brendan Jackman <jackmanb@google.com>
To: Johannes Weiner <hannes@cmpxchg.org>
To: Zi Yan <ziy@nvidia.com>
To: Waiman Long <longman@redhat.com>
To: Chen Ridong <chenridong@huaweicloud.com>
To: Michal Koutný <mkoutny@suse.com>
To: Jonathan Corbet <corbet@lwn.net>
To: Shuah Khan <skhan@linuxfoundation.org>
To: Shuah Khan <shuah@kernel.org>
Cc: linux-kernel@vger.kernel.org
Cc: rcu@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: cgroups@vger.kernel.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kselftest@vger.kernel.org

Changes in v2:
- Rebranded series from DHEI to DHM (Dynamic Housekeeping Management).
- Entirely dropped custom sysfs interface.
- Integrated housekeeping control into cgroup v2 cpuset controller
at the root level.
- Added SMT-aware pipeline logic (cpuset.housekeeping.smt_aware) to
prevent splitting SMT siblings.
- Added comprehensive documentation and cgroup functional selftests for
the DHM APIs.
- Refactored the internal mask transition logic to use RCU-safe
handover.
- Separated patch series into 4 logical phases for review.

v1 Link: https://lore.kernel.org/all/20260325-dhei-v12-final-v1-0-919cca23cadf@gmail.com

Signed-off-by: Qiliang Yuan <realwujing@gmail.com>
---
Qiliang Yuan (12):
sched/isolation: Separate housekeeping types in enum hk_type
sched/isolation: Introduce housekeeping notifier infrastructure
rcu: Support runtime NOCB initialization and dynamic offloading
tick/nohz: Transition to dynamic full dynticks state management
genirq: Support dynamic migration for managed interrupts
watchdog: Allow runtime toggle of lockup detector affinity
sched/core: Dynamically update scheduler domain housekeeping mask
workqueue, mm: Support dynamic housekeeping mask updates
cgroup/cpuset: Introduce CPUSet-driven dynamic housekeeping (DHM)
cgroup/cpuset: Implement SMT-aware grouping and safety guards
Documentation: cgroup-v2: Document dynamic housekeeping (DHM)
selftests: cgroup: Add functional tests for dynamic housekeeping

Documentation/admin-guide/cgroup-v2.rst | 24 +++++
include/linux/sched/isolation.h | 51 ++++++++---
kernel/cgroup/cpuset-internal.h | 2 +
kernel/cgroup/cpuset.c | 73 +++++++++++++++
kernel/irq/manage.c | 49 ++++++++++
kernel/rcu/rcu.h | 4 +
kernel/rcu/tree.c | 75 ++++++++++++++++
kernel/rcu/tree.h | 2 +-
kernel/rcu/tree_nocb.h | 31 ++++---
kernel/sched/core.c | 23 +++++
kernel/sched/isolation.c | 74 ++++++++++++++-
kernel/time/tick-sched.c | 130 +++++++++++++++++++++------
kernel/watchdog.c | 26 ++++++
kernel/workqueue.c | 42 +++++++++
mm/compaction.c | 27 ++++++
tools/testing/selftests/cgroup/test_cpuset.c | 36 ++++++++
16 files changed, 620 insertions(+), 49 deletions(-)
---
base-commit: bfe62a454542cfad3379f6ef5680b125f41e20f4
change-id: 20260408-wujing-dhm-8f43e2d49cd8

Best regards,
--
Qiliang Yuan <realwujing@gmail.com>