lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20260206-feature-dynamic_isolcpus_dhei-v1-0-00a711eb0c74@gmail.com>
Date: Fri, 06 Feb 2026 02:04:21 -0500
From: Qiliang Yuan <realwujing@...il.com>
To: Ingo Molnar <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>, 
 Juri Lelli <juri.lelli@...hat.com>, 
 Vincent Guittot <vincent.guittot@...aro.org>, 
 Dietmar Eggemann <dietmar.eggemann@....com>, 
 Steven Rostedt <rostedt@...dmis.org>, Ben Segall <bsegall@...gle.com>, 
 Mel Gorman <mgorman@...e.de>, Valentin Schneider <vschneid@...hat.com>, 
 Thomas Gleixner <tglx@...nel.org>, "Paul E. McKenney" <paulmck@...nel.org>, 
 Frederic Weisbecker <frederic@...nel.org>, 
 Neeraj Upadhyay <neeraj.upadhyay@...nel.org>, 
 Joel Fernandes <joelagnelf@...dia.com>, 
 Josh Triplett <josh@...htriplett.org>, Boqun Feng <boqun.feng@...il.com>, 
 Uladzislau Rezki <urezki@...il.com>, 
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
 Lai Jiangshan <jiangshanlai@...il.com>, Zqiang <qiang.zhang@...ux.dev>, 
 Tejun Heo <tj@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, 
 Vlastimil Babka <vbabka@...e.cz>, Suren Baghdasaryan <surenb@...gle.com>, 
 Michal Hocko <mhocko@...e.com>, Brendan Jackman <jackmanb@...gle.com>, 
 Johannes Weiner <hannes@...xchg.org>, Zi Yan <ziy@...dia.com>, 
 Anna-Maria Behnsen <anna-maria@...utronix.de>, 
 Ingo Molnar <mingo@...nel.org>
Cc: linux-kernel@...r.kernel.org, rcu@...r.kernel.org, linux-mm@...ck.org, 
 Qiliang Yuan <realwujing@...il.com>, Qiliang Yuan <yuanql9@...natelecom.cn>
Subject: [PATCH RFC 00/12] Implementation of Dynamic Housekeeping &
 Enhanced Isolation (DHEI)

The Linux kernel provides mechanisms like 'isolcpus' and 'nohz_full' to
reduce interference for latency-sensitive workloads. However, these are
locked behind the "Reboot Wall" - they can only be configured via boot
parameters and require a system restart to change.

*** THIS IS AN RFC ***
This series is being submitted as an Request For Comments to discuss the
architectural changes required to support dynamic reconfiguration of
housekeeping boundaries. Key points for discussion:
- The use of a blocking notifier chain for cross-subsystem synchronization.
- Compatibility with existing boot-time isolcpus and nohz_full parameters.
- User-space sysfs interface design for granular isolation control.

While cgroup2 (cpuset) provides task-centric resource partitioning (including
unbound kthreads), it lacks the infrastructure to reconfigure core kernel
subsystems or manage per-CPU kernel activities. Specifically, cgroups cannot:
- Managed interrupt (IRQ) migration.
- RCU callback offloading and grace-period kthread placement.
- Per-CPU kernel threads (e.g., watchdog/n) and global subsystem logic (e.g., kcompactd).
- Subsystem-level masks for unbound workqueues.
- Dynamic toggling of full dynticks (NOHZ_FULL) mode.

This patch series introduces Dynamic Housekeeping & Enhanced Isolation
(DHEI). DHEI allows administrators to reconfigure the kernel's
housekeeping boundaries at runtime via a new sysfs interface at
/sys/kernel/housekeeping/.

Core Architecture:
1. Notifier-Driven Synchronization: A new blocking notifier chain
   (HK_UPDATE_MASK) allows isolation.c to signal all participating
   subsystems (IRQ, RCU, Sched, Watchdog, Workqueue, kcompactd, Tick)
   whenever a housekeeping mask is modified.
2. Decoupled Memory Management: Replaced boot-time memory allocators
   with runtime-safe variants, allowing masks to be allocated or resized
   after the system is running.
3. Subsystem Handlers: Each critical subsystem implements a reconfiguration
   handler to migrate pending work, re-affine kthreads, or re-route
   interrupts dynamically.

Key Features:
- Fine-grained control: Separate sysfs nodes for timer, rcu, tick,
  workqueue, kthread, etc.
- Dynamic NOHZ_FULL: Supports enabling/disabling full dynticks mode
  on-the-fly by re-kicking CPUs to evaluate tick dependencies.
- SMT Awareness: An optional 'smt_aware_mode' ensures that all SMT
  siblings of a physical core stay in the same isolation state.
- Safety Guard: Prevents the isolation of all CPUs, ensuring at least
  one online CPU is always available for housekeeping tasks.

This series provides the necessary infrastructure for cloud-native
orchestrators and high-frequency trading platforms to dynamically
re-partition CPU resources without incurring the downtime of a reboot.

Signed-off-by: Qiliang Yuan <realwujing@...il.com>
---
Qiliang Yuan (12):
      sched/isolation: Remove __init restriction from housekeeping cores
      sched/isolation: Introduce reconfiguration notifier chain
      genirq: Implement dynamic migration for Managed IRQs
      rcu: Sync RCU housekeeping mask on notification
      sched/core: Dynamic update housekeeping_cpumask(HK_TYPE_DOMAIN)
      watchdog: Allow runtime toggle of hardlockup detector on CPUs
      workqueue: Dynamic housekeeping mask update support
      kcompactd: Add housekeeping notifier for dynamic mask update
      sched/isolation: Separate housekeeping types and add sysfs interface
      tick/nohz: Implement dynamic nohz_full state update
      sched/isolation: Implement SMT sibling auto-isolation and safety check
      sched/isolation: Bridge isolcpus and support runtime tick offload init

 include/linux/sched/isolation.h |  40 +++++--
 include/linux/tick.h            |   2 +-
 kernel/irq/manage.c             |  52 +++++++++
 kernel/rcu/tree.c               |  43 +++++++
 kernel/sched/core.c             |   5 +-
 kernel/sched/isolation.c        | 252 ++++++++++++++++++++++++++++++++++++++--
 kernel/sched/sched.h            |   2 +-
 kernel/sched/topology.c         |  26 +++++
 kernel/time/tick-sched.c        |  63 +++++++++-
 kernel/watchdog.c               |  24 ++++
 kernel/workqueue.c              |  39 +++++++
 mm/compaction.c                 |  26 +++++
 12 files changed, 547 insertions(+), 27 deletions(-)
---
base-commit: 1f97d9dcf53649c41c33227b345a36902cbb08ad
change-id: 20260206-feature-dynamic_isolcpus_dhei-ee46b6e3a477

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ