All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH sched_ext/for-6.17-fixes] sched_ext, sched/core: Fix build failure when !FAIR_GROUP_SCHED && EXT_GROUP_SCHED
@ 2025-09-16 21:06 Tejun Heo
  2025-09-17  6:11 ` Andrea Righi
  0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2025-09-16 21:06 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min, Peter Zijlstra
  Cc: linux-kernel, sched-ext

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
 }
 

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH sched_ext/for-6.17-fixes] sched_ext, sched/core: Fix build failure when !FAIR_GROUP_SCHED && EXT_GROUP_SCHED
  2025-09-16 21:06 [PATCH sched_ext/for-6.17-fixes] sched_ext, sched/core: Fix build failure when !FAIR_GROUP_SCHED && EXT_GROUP_SCHED Tejun Heo
@ 2025-09-17  6:11 ` Andrea Righi
  2025-09-17  9:09   ` Tejun Heo
  0 siblings, 1 reply; 3+ messages in thread
From: Andrea Righi @ 2025-09-17  6:11 UTC (permalink / raw)
  To: Tejun Heo
  Cc: David Vernet, Changwoo Min, Peter Zijlstra, linux-kernel,
	sched-ext

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
>  }
>  

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH sched_ext/for-6.17-fixes] sched_ext, sched/core: Fix build failure when !FAIR_GROUP_SCHED && EXT_GROUP_SCHED
  2025-09-17  6:11 ` Andrea Righi
@ 2025-09-17  9:09   ` Tejun Heo
  0 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2025-09-17  9:09 UTC (permalink / raw)
  To: Andrea Righi
  Cc: David Vernet, Changwoo Min, Peter Zijlstra, linux-kernel,
	sched-ext

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-09-17  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-16 21:06 [PATCH sched_ext/for-6.17-fixes] sched_ext, sched/core: Fix build failure when !FAIR_GROUP_SCHED && EXT_GROUP_SCHED Tejun Heo
2025-09-17  6:11 ` Andrea Righi
2025-09-17  9:09   ` Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.