kernel/sched/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202509170230.MwZsJSWa-lkp@intel.com/
---
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(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index be00629f0ba4..ccba6fc3c3fe 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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
}
On Tue, Sep 16, 2025 at 11:06:42AM -1000, Tejun Heo wrote: > 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") > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202509170230.MwZsJSWa-lkp@intel.com/ Missing SoB line? Apart than that LGTM. Tested-by: Andrea Righi <arighi@nvidia.com> Thanks, -Andrea > --- > 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(-) > > diff --git a/kernel/sched/core.c b/kernel/sched/core.c > index be00629f0ba4..ccba6fc3c3fe 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -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 > } >
On Wed, Sep 17, 2025 at 08:11:25AM +0200, Andrea Righi wrote: > On Tue, Sep 16, 2025 at 11:06:42AM -1000, Tejun Heo wrote: > > 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") > > Reported-by: kernel test robot <lkp@intel.com> > > Closes: https://lore.kernel.org/oe-kbuild-all/202509170230.MwZsJSWa-lkp@intel.com/ > > Missing SoB line? Apart than that LGTM. Oops, yeah. > Tested-by: Andrea Righi <arighi@nvidia.com> Applied with the tags added. Thanks. -- tejun
© 2016 - 2025 Red Hat, Inc.