LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

[PATCH 1/2] sched/isolation: Make HK_TYPE_KTHREAD an alias of HK_TYPE_DO

To: Simon Horman <horms@xxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, David Ahern <dsahern@xxxxxxxxxx>, Eric Dumazet <edumazet@xxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, Paolo Abeni <pabeni@xxxxxxxxxx>, Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>, Florian Westphal <fw@xxxxxxxxx>, Phil Sutter <phil@xxxxxx>, Frederic Weisbecker <frederic@xxxxxxxxxx>, Chen Ridong <chenridong@xxxxxxxxxx>, Phil Auld <pauld@xxxxxxxxxx>
Subject: [PATCH 1/2] sched/isolation: Make HK_TYPE_KTHREAD an alias of HK_TYPE_DOMAIN
Cc: linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, lvs-devel@xxxxxxxxxxxxxxx, netfilter-devel@xxxxxxxxxxxxxxx, coreteam@xxxxxxxxxxxxx, sheviks <sheviks@xxxxxxxxx>, Waiman Long <longman@xxxxxxxxxx>
From: Waiman Long <longman@xxxxxxxxxx>
Date: Tue, 24 Mar 2026 11:18:26 -0400
Since commit 041ee6f3727a ("kthread: Rely on HK_TYPE_DOMAIN for preferred
affinity management"), kthreads default to use the HK_TYPE_DOMAIN
cpumask. IOW, it is no longer affected by the setting of the nohz_full
boot kernel parameter.

That means HK_TYPE_KTHREAD should now be an alias of HK_TYPE_DOMAIN
instead of HK_TYPE_KERNEL_NOISE to correctly reflect the current kthread
behavior. Make the change as HK_TYPE_KTHREAD is still being used in
some networking code.

Fixes: 041ee6f3727a ("kthread: Rely on HK_TYPE_DOMAIN for preferred affinity 
management")
Signed-off-by: Waiman Long <longman@xxxxxxxxxx>
---
 include/linux/sched/isolation.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/linux/sched/isolation.h b/include/linux/sched/isolation.h
index dc3975ff1b2e..cf0fd03dd7a2 100644
--- a/include/linux/sched/isolation.h
+++ b/include/linux/sched/isolation.h
@@ -20,6 +20,11 @@ enum hk_type {
        HK_TYPE_KERNEL_NOISE,
        HK_TYPE_MAX,
 
+       /*
+        * HK_TYPE_KTHREAD is now an alias of HK_TYPE_DOMAIN
+        */
+       HK_TYPE_KTHREAD = HK_TYPE_DOMAIN,
+
        /*
         * The following housekeeping types are only set by the nohz_full
         * boot commandline option. So they can share the same value.
@@ -29,7 +34,6 @@ enum hk_type {
        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
 };
 
 #ifdef CONFIG_CPU_ISOLATION
-- 
2.53.0



<Prev in Thread] Current Thread [Next in Thread>