lkml.org 
[lkml]   [2026]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subject[PATCH v2 07/12] sched/core: Dynamically update scheduler domain housekeeping mask
Scheduler domains rely on HK_TYPE_DOMAIN to identify which CPUs are
isolated from general load balancing. Currently, these boundaries are
static and determined only during boot-time domain initialization.

Trigger a scheduler domain rebuild when the HK_TYPE_DOMAIN mask changes.

This ensures that scheduler isolation boundaries can be reconfigured
at runtime via the DHEI sysfs or cpuset interface.

Signed-off-by: Qiliang Yuan <realwujing@gmail.com>
---
kernel/sched/core.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 496dff740dcaf..b71c433bbc420 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -39,6 +39,7 @@
#include <linux/sched/nohz.h>
#include <linux/sched/rseq_api.h>
#include <linux/sched/rt.h>
+#include <linux/sched/topology.h>

#include <linux/blkdev.h>
#include <linux/context_tracking.h>
@@ -10959,3 +10960,25 @@ void sched_change_end(struct sched_change_ctx *ctx)
p->sched_class->prio_changed(rq, p, ctx->prio);
}
}
+
+static int sched_housekeeping_update(struct notifier_block *nb,
+ unsigned long action, void *data)
+{
+ struct housekeeping_update *update = data;
+
+ if (action == HK_UPDATE_MASK && update->type == HK_TYPE_DOMAIN)
+ rebuild_sched_domains();
+
+ return NOTIFY_OK;
+}
+
+static struct notifier_block sched_housekeeping_nb = {
+ .notifier_call = sched_housekeeping_update,
+};
+
+static int __init sched_housekeeping_init(void)
+{
+ housekeeping_register_notifier(&sched_housekeeping_nb);
+ return 0;
+}
+late_initcall(sched_housekeeping_init);
--
2.43.0


\
 
 \ /
  Last update: 2026-04-13 09:54    [W:0.156 / U:14.939 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog