[PATCH 03/15] sched/isolation: Separate housekeeping types in enum hk_type

Qiliang Yuan posted 15 patches 1 week ago
[PATCH 03/15] sched/isolation: Separate housekeeping types in enum hk_type
Posted by Qiliang Yuan 1 week ago
Most kernel noise types (TICK, TIMER, RCU, etc.) are currently
aliased to a single HK_TYPE_KERNEL_NOISE enum value. This prevents
fine-grained runtime isolation control as all masks are forced to be
identical.

Un-alias service-specific housekeeping types in enum hk_type.

This separation provides the necessary granularity for DHEI subsystems
to subscribe to and maintain independent affinity masks.

Signed-off-by: Qiliang Yuan <realwujing@gmail.com>
---
 include/linux/sched/isolation.h | 19 ++++++++-----------
 1 file changed, 8 insertions(+), 11 deletions(-)

diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h
index 9df55237d3901..6ec64eb3f8bcb 100644
--- a/include/linux/sched/isolation.h
+++ b/include/linux/sched/isolation.h
@@ -10,21 +10,18 @@
 enum hk_type {
 	HK_TYPE_DOMAIN,
 	HK_TYPE_MANAGED_IRQ,
-	HK_TYPE_KERNEL_NOISE,
+	HK_TYPE_TICK,
+	HK_TYPE_TIMER,
+	HK_TYPE_RCU,
+	HK_TYPE_MISC,
+	HK_TYPE_WQ,
+	HK_TYPE_KTHREAD,
 	HK_TYPE_MAX,
 
-	/*
-	 * The following housekeeping types are only set by the nohz_full
-	 * boot commandline option. So they can share the same value.
-	 */
-	HK_TYPE_TICK    = HK_TYPE_KERNEL_NOISE,
-	HK_TYPE_TIMER   = HK_TYPE_KERNEL_NOISE,
-	HK_TYPE_RCU     = HK_TYPE_KERNEL_NOISE,
-	HK_TYPE_MISC    = HK_TYPE_KERNEL_NOISE,
-	HK_TYPE_WQ      = HK_TYPE_KERNEL_NOISE,
-	HK_TYPE_KTHREAD = HK_TYPE_KERNEL_NOISE
 };
 
+#define HK_TYPE_KERNEL_NOISE HK_TYPE_TICK
+
 struct housekeeping_update {
 	enum hk_type type;
 	const struct cpumask *new_mask;

-- 
2.43.0
Re: [PATCH 03/15] sched/isolation: Separate housekeeping types in enum hk_type
Posted by Frederic Weisbecker 1 day, 16 hours ago
Le Wed, Mar 25, 2026 at 05:09:34PM +0800, Qiliang Yuan a écrit :
> Most kernel noise types (TICK, TIMER, RCU, etc.) are currently
> aliased to a single HK_TYPE_KERNEL_NOISE enum value. This prevents
> fine-grained runtime isolation control as all masks are forced to be
> identical.

For now we don't need finegrained runtime isolation. Only domain,
nohz_full and managed_irq. If the need arise, we can make it more
finegrained in the future.

Thanks.

-- 
Frederic Weisbecker
SUSE Labs
Re: [PATCH 03/15] sched/isolation: Separate housekeeping types in enum hk_type
Posted by Peter Zijlstra 1 week ago
On Wed, Mar 25, 2026 at 05:09:34PM +0800, Qiliang Yuan wrote:
> Most kernel noise types (TICK, TIMER, RCU, etc.) are currently
> aliased to a single HK_TYPE_KERNEL_NOISE enum value. This prevents
> fine-grained runtime isolation control as all masks are forced to be
> identical.
> 
> Un-alias service-specific housekeeping types in enum hk_type.
> 
> This separation provides the necessary granularity for DHEI subsystems
> to subscribe to and maintain independent affinity masks.

What the hell for?
Re: [PATCH 03/15] sched/isolation: Separate housekeeping types in enum hk_type
Posted by Qiliang Yuan 2 days, 14 hours ago
On Wed, Mar 25, 2026 at 02:59:04PM +0100, Peter Zijlstra wrote:
> What the hell for?

Direct and to the point. The original intent was to allow for asymmetric 
isolation (e.g. offloading RCU callbacks while keeping specific timers 
local for very specialized real-time monitoring).

However, I agree that for 99% of use cases, this is unnecessary 
complexity. In V13, I will consolidate these independent enum types 
into a unified housekeeping mask to simplify the configuration and 
reduce the "insane configuration space" you mentioned earlier.