On 4/13/26 3:43 AM, 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 DHM subsystems to
subscribe to and maintain independent affinity masks.

Usually, if we want to run a latency sensitive workload like DPDK, we try to minimize all sorts of kernel noises or interference as much as possible. Do you have a good use case where it is advantageous to remove some types of kernel noises from a given set of CPUs but not the others?

Cheers,
Longman

Signed-off-by: Qiliang Yuan <[email protected]>
---
  include/linux/sched/isolation.h | 20 ++++++++------------
  kernel/sched/isolation.c        | 10 +++++++++-
  2 files changed, 17 insertions(+), 13 deletions(-)

diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h
index dc3975ff1b2e1..b9a041247565c 100644
--- a/include/linux/sched/isolation.h
+++ b/include/linux/sched/isolation.h
@@ -17,21 +17,17 @@ enum hk_type {
        /* Inverse of boot-time isolcpus=managed_irq argument */
        HK_TYPE_MANAGED_IRQ,
        /* Inverse of boot-time nohz_full= or isolcpus=nohz arguments */
-       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
+
  #ifdef CONFIG_CPU_ISOLATION
  DECLARE_STATIC_KEY_FALSE(housekeeping_overridden);
  extern int housekeeping_any_cpu(enum hk_type type);
diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
index ef152d401fe20..e05ed5118e651 100644
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -15,9 +15,17 @@ enum hk_flags {
        HK_FLAG_DOMAIN_BOOT     = BIT(HK_TYPE_DOMAIN_BOOT),
        HK_FLAG_DOMAIN          = BIT(HK_TYPE_DOMAIN),
        HK_FLAG_MANAGED_IRQ     = BIT(HK_TYPE_MANAGED_IRQ),
-       HK_FLAG_KERNEL_NOISE    = BIT(HK_TYPE_KERNEL_NOISE),
+       HK_FLAG_TICK            = BIT(HK_TYPE_TICK),
+       HK_FLAG_TIMER           = BIT(HK_TYPE_TIMER),
+       HK_FLAG_RCU             = BIT(HK_TYPE_RCU),
+       HK_FLAG_MISC            = BIT(HK_TYPE_MISC),
+       HK_FLAG_WQ              = BIT(HK_TYPE_WQ),
+       HK_FLAG_KTHREAD         = BIT(HK_TYPE_KTHREAD),
  };
+#define HK_FLAG_KERNEL_NOISE (HK_FLAG_TICK | HK_FLAG_TIMER | HK_FLAG_RCU | \
+                             HK_FLAG_MISC | HK_FLAG_WQ | HK_FLAG_KTHREAD)
+
  DEFINE_STATIC_KEY_FALSE(housekeeping_overridden);
  EXPORT_SYMBOL_GPL(housekeeping_overridden);


Reply via email to