From: kernel test robot <lkp@intel.com>
To: Zqiang <qiang.zhang@linux.dev>,
tj@kernel.org, void@manifault.com, arighi@nvidia.com,
changwoo@igalia.com
Cc: oe-kbuild-all@lists.linux.dev, sched-ext@lists.linux.dev,
linux-kernel@vger.kernel.org, qiang.zhang@linux.dev
Subject: Re: [PATCH] sched_ext: Choose the right sch->ops.name to output in the print_scx_info()
Date: Thu, 26 Mar 2026 07:28:48 +0100 [thread overview]
Message-ID: <202603260700.UT38KZHC-lkp@intel.com> (raw)
In-Reply-To: <20260324120313.12632-1-qiang.zhang@linux.dev>
Hi Zqiang,
kernel test robot noticed the following build errors:
[auto build test ERROR on tip/sched/core]
[also build test ERROR on linus/master v7.0-rc5]
[cannot apply to next-20260325]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Zqiang/sched_ext-Choose-the-right-sch-ops-name-to-output-in-the-print_scx_info/20260326-043528
base: tip/sched/core
patch link: https://lore.kernel.org/r/20260324120313.12632-1-qiang.zhang%40linux.dev
patch subject: [PATCH] sched_ext: Choose the right sch->ops.name to output in the print_scx_info()
config: x86_64-rhel-9.4-bpf (https://download.01.org/0day-ci/archive/20260326/202603260700.UT38KZHC-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260326/202603260700.UT38KZHC-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603260700.UT38KZHC-lkp@intel.com/
All errors (new ones prefixed by >>):
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);
| ^
vim +/scx_task_sched_rcu +5719 kernel/sched/ext.c
5695
5696 /**
5697 * print_scx_info - print out sched_ext scheduler state
5698 * @log_lvl: the log level to use when printing
5699 * @p: target task
5700 *
5701 * If a sched_ext scheduler is enabled, print the name and state of the
5702 * scheduler. If @p is on sched_ext, print further information about the task.
5703 *
5704 * This function can be safely called on any task as long as the task_struct
5705 * itself is accessible. While safe, this function isn't synchronized and may
5706 * print out mixups or garbages of limited length.
5707 */
5708 void print_scx_info(const char *log_lvl, struct task_struct *p)
5709 {
5710 struct scx_sched *sch;
5711 enum scx_enable_state state = scx_enable_state();
5712 const char *all = READ_ONCE(scx_switching_all) ? "+all" : "";
5713 char runnable_at_buf[22] = "?";
5714 struct sched_class *class;
5715 unsigned long runnable_at;
5716
5717 guard(rcu)();
5718
> 5719 sch = scx_task_sched_rcu(p);
5720
5721 if (!sch || state == SCX_DISABLED)
5722 return;
5723
5724 /*
5725 * Carefully check if the task was running on sched_ext, and then
5726 * carefully copy the time it's been runnable, and its state.
5727 */
5728 if (copy_from_kernel_nofault(&class, &p->sched_class, sizeof(class)) ||
5729 class != &ext_sched_class) {
5730 printk("%sSched_ext: %s (%s%s)", log_lvl, sch->ops.name,
5731 scx_enable_state_str[state], all);
5732 return;
5733 }
5734
5735 if (!copy_from_kernel_nofault(&runnable_at, &p->scx.runnable_at,
5736 sizeof(runnable_at)))
5737 scnprintf(runnable_at_buf, sizeof(runnable_at_buf), "%+ldms",
5738 jiffies_delta_msecs(runnable_at, jiffies));
5739
5740 /* print everything onto one line to conserve console space */
5741 printk("%sSched_ext: %s (%s%s), task: runnable_at=%s",
5742 log_lvl, sch->ops.name, scx_enable_state_str[state], all,
5743 runnable_at_buf);
5744 }
5745
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2026-03-26 6:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 12:03 [PATCH] sched_ext: Choose the right sch->ops.name to output in the print_scx_info() Zqiang
2026-03-24 14:37 ` Tejun Heo
2026-03-26 6:28 ` kernel test robot [this message]
2026-03-26 6:42 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202603260700.UT38KZHC-lkp@intel.com \
--to=lkp@intel.com \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=qiang.zhang@linux.dev \
--cc=sched-ext@lists.linux.dev \
--cc=tj@kernel.org \
--cc=void@manifault.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox