* [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
@ 2026-03-26 8:09 Cheng-Yang Chou
2026-03-27 5:35 ` Cheng-Yang Chou
0 siblings, 1 reply; 9+ messages in thread
From: Cheng-Yang Chou @ 2026-03-26 8:09 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, yphbchou0911, Zqiang,
kernel test robot
scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
to rcu_dereference(scx_root) for the non-sub-sched case, which is
semantically equivalent.
Fixes: 60d4b17e886a ("sched_ext: Choose the right sch->ops.name to output in the print_scx_info()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603261453.8kiJImYo-lkp@intel.com/
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
kernel/sched/ext.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 551bfb99157d..a40edd4d7cd9 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -7689,7 +7689,11 @@ void print_scx_info(const char *log_lvl, struct task_struct *p)
guard(rcu)();
+#ifdef CONFIG_EXT_SUB_SCHED
sch = scx_task_sched_rcu(p);
+#else
+ sch = rcu_dereference(scx_root);
+#endif
if (!sch)
return;
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-03-26 8:09 [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels Cheng-Yang Chou
@ 2026-03-27 5:35 ` Cheng-Yang Chou
2026-03-27 17:18 ` Tejun Heo
0 siblings, 1 reply; 9+ messages in thread
From: Cheng-Yang Chou @ 2026-03-27 5:35 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, Zqiang, kernel test robot
Hi Tejun,
On Thu, Mar 26, 2026 at 04:09:15PM +0800, Cheng-Yang Chou wrote:
> scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
> enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
> to rcu_dereference(scx_root) for the non-sub-sched case, which is
> semantically equivalent.
>
> Fixes: 60d4b17e886a ("sched_ext: Choose the right sch->ops.name to output in the print_scx_info()")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202603261453.8kiJImYo-lkp@intel.com/
> Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
> ---
> kernel/sched/ext.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
> index 551bfb99157d..a40edd4d7cd9 100644
> --- a/kernel/sched/ext.c
> +++ b/kernel/sched/ext.c
> @@ -7689,7 +7689,11 @@ void print_scx_info(const char *log_lvl, struct task_struct *p)
>
> guard(rcu)();
>
> +#ifdef CONFIG_EXT_SUB_SCHED
> sch = scx_task_sched_rcu(p);
> +#else
> + sch = rcu_dereference(scx_root);
> +#endif
>
> if (!sch)
> return;
> --
> 2.48.1
>
Gentle ping!
--
Thanks,
Cheng-Yang
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-03-27 5:35 ` Cheng-Yang Chou
@ 2026-03-27 17:18 ` Tejun Heo
2026-03-27 18:21 ` Cheng-Yang Chou
0 siblings, 1 reply; 9+ messages in thread
From: Tejun Heo @ 2026-03-27 17:18 UTC (permalink / raw)
To: Cheng-Yang Chou
Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai, Zqiang, kernel test robot
On Fri, Mar 27, 2026 at 01:35:53PM +0800, Cheng-Yang Chou wrote:
> Hi Tejun,
>
> On Thu, Mar 26, 2026 at 04:09:15PM +0800, Cheng-Yang Chou wrote:
> > scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
> > enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
> > to rcu_dereference(scx_root) for the non-sub-sched case, which is
> > semantically equivalent.
> >
> > Fixes: 60d4b17e886a ("sched_ext: Choose the right sch->ops.name to output in the print_scx_info()")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202603261453.8kiJImYo-lkp@intel.com/
> > Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
Have you tried reproducing the problem? This is trivial to try to reproduce.
You aren't even doing the absoulte minimum. Before sending patches, read the
relevant code and reproduce the problem. I get that AI makes it easy to pump
up the volume but try to reduce the volume and improve the actual
contribution. Otherwise, I'll have to mostly ignore your emails.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-03-27 17:18 ` Tejun Heo
@ 2026-03-27 18:21 ` Cheng-Yang Chou
2026-03-27 18:41 ` Andrea Righi
0 siblings, 1 reply; 9+ messages in thread
From: Cheng-Yang Chou @ 2026-03-27 18:21 UTC (permalink / raw)
To: Tejun Heo
Cc: sched-ext, David Vernet, Andrea Righi, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai, Zqiang, kernel test robot
Hi Tejun,
On Fri, Mar 27, 2026 at 07:18:59AM -1000, Tejun Heo wrote:
> On Fri, Mar 27, 2026 at 01:35:53PM +0800, Cheng-Yang Chou wrote:
> > Hi Tejun,
> >
> > On Thu, Mar 26, 2026 at 04:09:15PM +0800, Cheng-Yang Chou wrote:
> > > scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
> > > enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
> > > to rcu_dereference(scx_root) for the non-sub-sched case, which is
> > > semantically equivalent.
> > >
> > > Fixes: 60d4b17e886a ("sched_ext: Choose the right sch->ops.name to output in the print_scx_info()")
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202603261453.8kiJImYo-lkp@intel.com/
> > > Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
>
> Have you tried reproducing the problem? This is trivial to try to reproduce.
> You aren't even doing the absoulte minimum. Before sending patches, read the
> relevant code and reproduce the problem. I get that AI makes it easy to pump
> up the volume but try to reduce the volume and improve the actual
> contribution. Otherwise, I'll have to mostly ignore your emails.
Actually, I can reproduce this error on my end with the provided config.
This patch does fix the issue.
I'll make sure to include the test log in my future submissions to
avoid any confusion.
Here is the full log for this reproduction:
> Reproduce
$ git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 2>/dev/null
git fetch tip sched/core
git checkout tip/sched/core
From https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* branch sched/core -> FETCH_HEAD
Warning: you are leaving 1 commit behind, not connected to
any of your branches:
43cb4d487c60 sched_ext: Choose the right sch->ops.name to output in the print_scx_info()
If you want to keep it by creating a new branch, this may be a good time
to do so with:
git branch <new-branch-name> 43cb4d487c60
HEAD is now at 265439eb88fd MAINTAINERS: Add K Prateek Nayak to scheduler reviewers
$ b4 shazam https://lore.kernel.org/r/20260324120313.12632-1-qiang.zhang@linux.dev
Grabbing thread from lore.kernel.org/all/20260324120313.12632-1-qiang.zhang@linux.dev/t.mbox.gz
Checking for newer revisions
Grabbing search results from lore.kernel.org
Added from v2: 1 patches
Analyzing 6 messages in the thread
Analyzing 0 code-review messages
Will use the latest revision: v2
You can pick other revisions using the -vN flag
Checking attestation on all messages, may take a moment...
---
✓ [PATCH v2] sched_ext: Choose the right sch->ops.name to output in the print_scx_info()
---
✓ Signed: DKIM/linux.dev
---
Total patches: 1
---
Applying: sched_ext: Choose the right sch->ops.name to output in the print_scx_info()
$ mkdir -p build_dir
$ wget https://download.01.org/0day-ci/archive/20260326/202603261453.8kiJImYo-lkp@intel.com/config -O build_dir/.config
--2026-03-28 02:06:58-- https://download.01.org/0day-ci/archive/20260326/202603261453.8kiJImYo-lkp@intel.com/config
Resolving download.01.org (download.01.org)... 2001:288:6:91::a87, 2001:288:6:85::a87, 23.220.230.175
Connecting to download.01.org (download.01.org)|2001:288:6:91::a87|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 258088 (252K) [text/plain]
Saving to: ‘build_dir/.config’
build_dir/.config
100%[================================================================================================================>] 252.04K --.-KB/s in 0.02s
2026-03-28 02:06:58 (15.2 MB/s) - ‘build_dir/.config’ saved [258088/258088]
$ make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/
make[1]: Entering directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
GEN Makefile
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
HOSTCC scripts/kconfig/lexer.lex.o
HOSTCC scripts/kconfig/menu.o
[...]
CC kernel/sched/core.o
CC kernel/sched/fair.o
CC kernel/sched/build_policy.o
In file included from ../kernel/sched/build_policy.c:62:
../kernel/sched/ext.c: In function ‘scx_vexit’:
../kernel/sched/ext.c:4800:9: warning: function ‘scx_vexit’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
4800 | vscnprintf(ei->msg, SCX_EXIT_MSG_LEN, fmt, args);
| ^~~~~~~~~~
../kernel/sched/ext.c: In function ‘print_scx_info’:
../kernel/sched/ext.c:5719:15: error: implicit declaration of function ‘scx_task_sched_rcu’ [-Wimplicit-function-declaration]
5719 | sch = scx_task_sched_rcu(p);
| ^~~~~~~~~~~~~~~~~~
../kernel/sched/ext.c:5719:13: error: assignment to ‘struct scx_sched *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
5719 | sch = scx_task_sched_rcu(p);
| ^
> Apply patch here
$ git am fix.patch
Applying: sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
$ make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/
make[1]: Entering directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
GEN Makefile
#
# No change to .config
#
make[1]: Leaving directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
make[1]: Entering directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
GEN Makefile
UPD include/config/kernel.release
UPD include/generated/utsrelease.h
CALL ../scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
DESCEND bpf/resolve_btfids
INSTALL libsubcmd_headers
CC kernel/sys.o
CC kernel/sched/build_policy.o
In file included from ../kernel/sched/build_policy.c:62:
../kernel/sched/ext.c: In function ‘scx_vexit’:
../kernel/sched/ext.c:4800:9: warning: function ‘scx_vexit’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
4800 | vscnprintf(ei->msg, SCX_EXIT_MSG_LEN, fmt, args);
| ^~~~~~~~~~
CC kernel/sched/build_utility.o
AR kernel/sched/built-in.a
CC kernel/locking/mutex.o
CC kernel/locking/semaphore.o
CC kernel/locking/rwsem.o
CC kernel/locking/percpu-rwsem.o
CC kernel/locking/mutex-debug.o
--
Thanks,
Cheng-Yang
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-03-27 18:21 ` Cheng-Yang Chou
@ 2026-03-27 18:41 ` Andrea Righi
2026-03-27 19:01 ` Cheng-Yang Chou
0 siblings, 1 reply; 9+ messages in thread
From: Andrea Righi @ 2026-03-27 18:41 UTC (permalink / raw)
To: Cheng-Yang Chou
Cc: Tejun Heo, sched-ext, David Vernet, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai, Zqiang, kernel test robot
On Sat, Mar 28, 2026 at 02:21:42AM +0800, Cheng-Yang Chou wrote:
> Hi Tejun,
>
> On Fri, Mar 27, 2026 at 07:18:59AM -1000, Tejun Heo wrote:
> > On Fri, Mar 27, 2026 at 01:35:53PM +0800, Cheng-Yang Chou wrote:
> > > Hi Tejun,
> > >
> > > On Thu, Mar 26, 2026 at 04:09:15PM +0800, Cheng-Yang Chou wrote:
> > > > scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
> > > > enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
> > > > to rcu_dereference(scx_root) for the non-sub-sched case, which is
> > > > semantically equivalent.
> > > >
> > > > Fixes: 60d4b17e886a ("sched_ext: Choose the right sch->ops.name to output in the print_scx_info()")
> > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > Closes: https://lore.kernel.org/oe-kbuild-all/202603261453.8kiJImYo-lkp@intel.com/
> > > > Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
> >
> > Have you tried reproducing the problem? This is trivial to try to reproduce.
> > You aren't even doing the absoulte minimum. Before sending patches, read the
> > relevant code and reproduce the problem. I get that AI makes it easy to pump
> > up the volume but try to reduce the volume and improve the actual
> > contribution. Otherwise, I'll have to mostly ignore your emails.
>
> Actually, I can reproduce this error on my end with the provided config.
> This patch does fix the issue.
>
> I'll make sure to include the test log in my future submissions to
> avoid any confusion.
>
> Here is the full log for this reproduction:
For what I see It should be fixed already in Tejun's branch:
git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git
From kernel/sched/ext_internal.h:
#ifdef CONFIG_EXT_SUB_SCHED
...
static inline struct scx_sched *scx_task_sched_rcu(const struct task_struct *p)
{
return rcu_dereference_all(p->scx.sched);
}
...
#else /* CONFIG_EXT_SUB_SCHED */
static inline struct scx_sched *scx_task_sched_rcu(const struct task_struct *p)
{
return rcu_dereference_all(scx_root);
}
...
Try with the for-7.1 branch.
-Andrea
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-03-27 18:41 ` Andrea Righi
@ 2026-03-27 19:01 ` Cheng-Yang Chou
2026-03-27 19:48 ` Tejun Heo
0 siblings, 1 reply; 9+ messages in thread
From: Cheng-Yang Chou @ 2026-03-27 19:01 UTC (permalink / raw)
To: Andrea Righi
Cc: Tejun Heo, sched-ext, David Vernet, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai, Zqiang, kernel test robot
Hi Andrea,
On Fri, Mar 27, 2026 at 07:41:47PM +0100, Andrea Righi wrote:
> On Sat, Mar 28, 2026 at 02:21:42AM +0800, Cheng-Yang Chou wrote:
> > Hi Tejun,
> >
> > On Fri, Mar 27, 2026 at 07:18:59AM -1000, Tejun Heo wrote:
> > > On Fri, Mar 27, 2026 at 01:35:53PM +0800, Cheng-Yang Chou wrote:
> > > > Hi Tejun,
> > > >
> > > > On Thu, Mar 26, 2026 at 04:09:15PM +0800, Cheng-Yang Chou wrote:
> > > > > scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
> > > > > enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
> > > > > to rcu_dereference(scx_root) for the non-sub-sched case, which is
> > > > > semantically equivalent.
> > > > >
> > > > > Fixes: 60d4b17e886a ("sched_ext: Choose the right sch->ops.name to output in the print_scx_info()")
> > > > > Reported-by: kernel test robot <lkp@intel.com>
> > > > > Closes: https://lore.kernel.org/oe-kbuild-all/202603261453.8kiJImYo-lkp@intel.com/
> > > > > Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
> > >
> > > Have you tried reproducing the problem? This is trivial to try to reproduce.
> > > You aren't even doing the absoulte minimum. Before sending patches, read the
> > > relevant code and reproduce the problem. I get that AI makes it easy to pump
> > > up the volume but try to reduce the volume and improve the actual
> > > contribution. Otherwise, I'll have to mostly ignore your emails.
> >
> > Actually, I can reproduce this error on my end with the provided config.
> > This patch does fix the issue.
> >
> > I'll make sure to include the test log in my future submissions to
> > avoid any confusion.
> >
> > Here is the full log for this reproduction:
>
> For what I see It should be fixed already in Tejun's branch:
> git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git
>
> From kernel/sched/ext_internal.h:
>
> #ifdef CONFIG_EXT_SUB_SCHED
> ...
> static inline struct scx_sched *scx_task_sched_rcu(const struct task_struct *p)
> {
> return rcu_dereference_all(p->scx.sched);
> }
> ...
> #else /* CONFIG_EXT_SUB_SCHED */
> static inline struct scx_sched *scx_task_sched_rcu(const struct task_struct *p)
> {
> return rcu_dereference_all(scx_root);
> }
> ...
>
> Try with the for-7.1 branch.
Thanks for clarifying.
I see that the fix, and I have verified the build passes there.
I'll make sure to cross-check with the latest branch next time and not
fully trust the robot's base tree...
For future robot reports, should I strictly follow the provided reproducer
steps, or just apply the robot's .config to the latest maintainer tree?
$ # on for-7.1 branch
$ wget https://download.01.org/0day-ci/archive/20260326/202603261453.8kiJImYo-lkp@intel.com/config -O build_dir/.config
--2026-03-28 02:52:55-- https://download.01.org/0day-ci/archive/20260326/202603261453.8kiJImYo-lkp@intel.com/config
Resolving download.01.org (download.01.org)... 2001:288:6:91::a87, 2001:288:6:85::a87, 23.220.230.175
Connecting to download.01.org (download.01.org)|2001:288:6:91::a87|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 258088 (252K) [text/plain]
Saving to: ‘build_dir/.config’
build_dir/.config
100%[====================================================================================>] 252.04K --.-KB/s in 0.02s
2026-03-28 02:52:56 (14.8 MB/s) - ‘build_dir/.config’ saved [258088/258088]
$ make W=1 O=build_dir ARCH=x86_64 olddefconfig
make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/
make[1]: Entering directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
GEN Makefile
#
# configuration written to .config
#
make[1]: Leaving directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
make[1]: Entering directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
SYNC include/config/auto.conf
GEN Makefile
GEN Makefile
CALL ../scripts/checksyscalls.sh
DESCEND objtool
INSTALL libsubcmd_headers
DESCEND bpf/resolve_btfids
INSTALL libsubcmd_headers
CC kernel/dma/mapping.o
[...]
CC kernel/watch_queue.o
AR kernel/built-in.a
GEN kernel/kheaders_data.tar.xz
CC [M] kernel/kheaders.o
CC [M] kernel/torture.o
make[1]: Leaving directory '/home/eric-wcnlab/dev/sched_ext/build_dir'
--
Thanks,
Cheng-Yang
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-03-27 19:01 ` Cheng-Yang Chou
@ 2026-03-27 19:48 ` Tejun Heo
0 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2026-03-27 19:48 UTC (permalink / raw)
To: Cheng-Yang Chou
Cc: Andrea Righi, sched-ext, David Vernet, Changwoo Min,
Ching-Chun Huang, Chia-Ping Tsai, Zqiang, kernel test robot
Hello,
On Sat, Mar 28, 2026 at 03:01:45AM +0800, Cheng-Yang Chou wrote:
...
> I see that the fix, and I have verified the build passes there.
> I'll make sure to cross-check with the latest branch next time and not
> fully trust the robot's base tree...
It was never broken. scx_task_sched[_rcu]() were added by 88234b075c3f:
+#ifdef CONFIG_EXT_SUB_SCHED
...
+static inline struct scx_sched *scx_task_sched(const struct task_struct *p)
+{
...
+}
...
+static inline struct scx_sched *scx_task_sched_rcu(const struct task_struct *p)
+{
...
+}
...
+#else /* CONFIG_EXT_SUB_SCHED */
+static inline struct scx_sched *scx_task_sched(const struct task_struct *p)
+{
+ return rcu_dereference_protected(scx_root,
+ lockdep_is_held(&p->pi_lock) ||
+ lockdep_is_held(__rq_lockp(task_rq(p))));
+}
+
+static inline struct scx_sched *scx_task_sched_rcu(const struct task_struct *p)
+{
+ return rcu_dereference_all(scx_root);
+}
...
+#endif /* CONFIG_EXT_SUB_SCHED */
Just a cursory look at the definition should have stopped this from
happening. Actually read the kernel test robot report. It's saying it tried
to apply the patch on non-sched_ext trees and that led to compilation
failures because they expectedly don't have changes from sched_ext/for-7.1.
> For future robot reports, should I strictly follow the provided reproducer
> steps, or just apply the robot's .config to the latest maintainer tree?
I don't think it's about having specific procedures for everything. You
can't guard against everything with proceures. It's more about the main
principle: read and understand the code before sending patches.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-04-03 4:09 [PATCH] tools/sched_ext: Add scx_lib_init() to probe BPF prolog migrate_disable() behavior Cheng-Yang Chou
@ 2026-04-03 4:09 ` Cheng-Yang Chou
2026-04-03 4:14 ` Cheng-Yang Chou
0 siblings, 1 reply; 9+ messages in thread
From: Cheng-Yang Chou @ 2026-04-03 4:09 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, yphbchou0911, kernel test robot
scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
to rcu_dereference(scx_root) for the non-sub-sched case, which is
semantically equivalent.
Fixes: 60d4b17e886a ("sched_ext: Choose the right sch->ops.name to output in the print_scx_info()")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202603261453.8kiJImYo-lkp@intel.com/
Signed-off-by: Cheng-Yang Chou <yphbchou0911@gmail.com>
---
kernel/sched/ext.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/sched/ext.c b/kernel/sched/ext.c
index 551bfb99157d..a40edd4d7cd9 100644
--- a/kernel/sched/ext.c
+++ b/kernel/sched/ext.c
@@ -7689,7 +7689,11 @@ void print_scx_info(const char *log_lvl, struct task_struct *p)
guard(rcu)();
+#ifdef CONFIG_EXT_SUB_SCHED
sch = scx_task_sched_rcu(p);
+#else
+ sch = rcu_dereference(scx_root);
+#endif
if (!sch)
return;
--
2.48.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels
2026-04-03 4:09 ` [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels Cheng-Yang Chou
@ 2026-04-03 4:14 ` Cheng-Yang Chou
0 siblings, 0 replies; 9+ messages in thread
From: Cheng-Yang Chou @ 2026-04-03 4:14 UTC (permalink / raw)
To: sched-ext, Tejun Heo, David Vernet, Andrea Righi, Changwoo Min
Cc: Ching-Chun Huang, Chia-Ping Tsai, kernel test robot
On Fri, Apr 03, 2026 at 12:09:03PM +0800, Cheng-Yang Chou wrote:
> scx_task_sched_rcu() is only available when CONFIG_EXT_SUB_SCHED is
> enabled. Wrap the call with #ifdef CONFIG_EXT_SUB_SCHED and fall back
> to rcu_dereference(scx_root) for the non-sub-sched case, which is
> semantically equivalent.
>
That was sent by accident.
Sorry for the noise!
--
Thanks,
Cheng-Yang
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2026-04-03 4:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 8:09 [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels Cheng-Yang Chou
2026-03-27 5:35 ` Cheng-Yang Chou
2026-03-27 17:18 ` Tejun Heo
2026-03-27 18:21 ` Cheng-Yang Chou
2026-03-27 18:41 ` Andrea Righi
2026-03-27 19:01 ` Cheng-Yang Chou
2026-03-27 19:48 ` Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2026-04-03 4:09 [PATCH] tools/sched_ext: Add scx_lib_init() to probe BPF prolog migrate_disable() behavior Cheng-Yang Chou
2026-04-03 4:09 ` [PATCH] sched_ext: Fix print_scx_info() build error on !CONFIG_EXT_SUB_SCHED kernels Cheng-Yang Chou
2026-04-03 4:14 ` Cheng-Yang Chou
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.