Skip to contentSkip to conversation

sched_ext, sched/core: Fix build failure when !FAIR_GROUP_SCHED && EXT_GROUP_SCHED

PATCH In review Tejun Heo 2 participants 3 messages Sep 16, 2025 – Sep 17, 2025

Subsystems (2)
lore
Share & tools
lore

Tejun Heo

author reviewer
#0 lore raw

PATCH 1/1 sched_ext, sched/core: Fix build failure when !FAIR_GROUP_SCHED && EXT_GROUP_SCHED

While collecting SCX related fields in struct task_group into struct scx_task_group, 6e6558a6bc41 ("sched_ext, sched/core: Factor out struct scx_task_group") forgot update tg->scx_weight usage in tg_weight(), which leads to build failure when CONFIG_FAIR_GROUP_SCHED is disabled but CONFIG_EXT_GROUP_SCHED is enabled. Fix it.

Fixes 6e6558a6bc41 ("sched_ext, sched/core: Factor out struct scx_task_group")

---
Peter, I'll apply this to sched_ext/for-6.17-fixes and send it Linus' way. Please let me know for any concerns.

Thanks.

 kernel/sched/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
index be00629f0ba4..ccba6fc3c3fe 100644
@@ -9551,7 +9551,7 @@ static unsigned long tg_weight(struct task_group *tg)
 #ifdef CONFIG_FAIR_GROUP_SCHED
 	return scale_load_down(tg->shares);
 #else
-	return sched_weight_from_cgroup(tg->scx_weight);
+	return sched_weight_from_cgroup(tg->scx.weight);
 #endif
 }
 
reviewer Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · Tejun Heo

While collecting SCX related fields in struct task_group into struct scx_task_group, 6e6558a6bc41 ("sched_ext, sched/core: Factor out struct scx_task_group") forgot update tg->scx_weight usage in tg_weight(), which leads to build failure when CONFIG_FAIR_GROUP_SCHED is disabled but CONFIG_EXT_GROUP_SCHED is enabled. Fix it.

Fixes 6e6558a6bc41 ("sched_ext, sched/core: Factor out struct scx_task_group")

Missing SoB line? Apart than that LGTM.

Thanks,
-Andrea

Quoted 22 lines

---
Peter, I'll apply this to sched_ext/for-6.17-fixes and send it Linus' way. Please let me know for any concerns.

Thanks.

 kernel/sched/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/sched/core.c +1 -1
index be00629f0ba4..ccba6fc3c3fe 100644
@@ -9551,7 +9551,7 @@ static unsigned long tg_weight(struct task_group *tg)
 #ifdef CONFIG_FAIR_GROUP_SCHED
 	return scale_load_down(tg->shares);
 #else
-	return sched_weight_from_cgroup(tg->scx_weight);
+	return sched_weight_from_cgroup(tg->scx.weight);
 #endif
 }
 
author reviewer
#2 lore raw
Quoted 7 lines · Andrea Righi
Quoted 6 lines · Tejun Heo

While collecting SCX related fields in struct task_group into struct scx_task_group, 6e6558a6bc41 ("sched_ext, sched/core: Factor out struct scx_task_group") forgot update tg->scx_weight usage in tg_weight(), which leads to build failure when CONFIG_FAIR_GROUP_SCHED is disabled but CONFIG_EXT_GROUP_SCHED is enabled. Fix it.

Quoted 5 lines
Quoted 3 lines
Fixes 6e6558a6bc41 ("sched_ext, sched/core: Factor out struct scx_task_group")

Missing SoB line? Apart than that LGTM.

Oops, yeah.

Quoted 1 line

Applied with the tags added.

Thanks.

Signature · 1 line
tejun