Re: [PATCH v1] sched/debug: Update print_task formatin /sys/kernel/debug/sched/debug

From: kernel test robot
Date: Sat Dec 16 2023 - 21:37:29 EST


Hi Junwen,

kernel test robot noticed the following build errors:

[auto build test ERROR on tip/sched/core]
[also build test ERROR on linus/master v6.7-rc5 next-20231215]
[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/Junwen-Wu/sched-debug-Update-print_task-formatin-sys-kernel-debug-sched-debug/20231216-234714
base: tip/sched/core
patch link: https://lore.kernel.org/r/20231216154412.613443-1-wudaemon%40163.com
patch subject: [PATCH v1] sched/debug: Update print_task formatin /sys/kernel/debug/sched/debug
config: arm-hisi_defconfig (https://download.01.org/0day-ci/archive/20231217/202312171007.tDZmSAZV-lkp@xxxxxxxxx/config)
compiler: arm-linux-gnueabi-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231217/202312171007.tDZmSAZV-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202312171007.tDZmSAZV-lkp@xxxxxxxxx/

All error/warnings (new ones prefixed by >>):

In file included from kernel/sched/build_utility.c:72:
kernel/sched/debug.c: In function 'print_rq':
>> kernel/sched/debug.c:1129:2: error: unterminated argument list invoking macro "SEQ_printf"
1129 | }
| ^
>> kernel/sched/debug.c:613:9: error: unknown type name 'SEQ_printf'
613 | SEQ_printf(m, " S task PID tree-key deadline"
| ^~~~~~~~~~
In file included from kernel/sched/build_utility.c:79:
>> kernel/sched/loadavg.c:58:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'calc_load_tasks'
58 | atomic_long_t calc_load_tasks;
| ^~~~~~~~~~~~~~~
In file included from include/linux/linkage.h:7,
from include/linux/kernel.h:18,
from include/linux/cpumask.h:10,
from include/linux/smp.h:13,
from include/linux/sched/clock.h:5,
from kernel/sched/build_utility.c:12:
>> kernel/sched/loadavg.c:61:15: error: extern declaration of 'avenrun' follows declaration with no linkage
61 | EXPORT_SYMBOL(avenrun); /* should be removed */
| ^~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/loadavg.c:61:1: note: in expansion of macro 'EXPORT_SYMBOL'
61 | EXPORT_SYMBOL(avenrun); /* should be removed */
| ^~~~~~~~~~~~~
kernel/sched/loadavg.c:60:15: note: previous declaration of 'avenrun' with type 'long unsigned int[3]'
60 | unsigned long avenrun[3];
| ^~~~~~~
>> kernel/sched/loadavg.c:109:1: error: invalid storage class for function 'fixed_power_int'
109 | fixed_power_int(unsigned long x, unsigned int frac_bits, unsigned int n)
| ^~~~~~~~~~~~~~~
>> kernel/sched/loadavg.c:208:19: error: invalid storage class for function 'calc_load_write_idx'
208 | static inline int calc_load_write_idx(void)
| ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/loadavg.c:228:19: error: invalid storage class for function 'calc_load_read_idx'
228 | static inline int calc_load_read_idx(void)
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/loadavg.c:233:13: error: invalid storage class for function 'calc_load_nohz_fold'
233 | static void calc_load_nohz_fold(struct rq *rq)
| ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/loadavg.c:283:13: error: invalid storage class for function 'calc_load_nohz_read'
283 | static long calc_load_nohz_read(void)
| ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/loadavg.c:303:13: error: invalid storage class for function 'calc_global_nohz'
303 | static void calc_global_nohz(void)
| ^~~~~~~~~~~~~~~~
In file included from kernel/sched/build_utility.c:80:
>> kernel/sched/completion.c:16:13: error: invalid storage class for function 'complete_with_flags'
16 | static void complete_with_flags(struct completion *x, int wake_flags)
| ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/completion.c:49:15: error: non-static declaration of 'complete' follows static declaration
49 | EXPORT_SYMBOL(complete);
| ^~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:49:1: note: in expansion of macro 'EXPORT_SYMBOL'
49 | EXPORT_SYMBOL(complete);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:45:6: note: previous definition of 'complete' with type 'void(struct completion *)'
45 | void complete(struct completion *x)
| ^~~~~~~~
>> kernel/sched/completion.c:78:15: error: non-static declaration of 'complete_all' follows static declaration
78 | EXPORT_SYMBOL(complete_all);
| ^~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:78:1: note: in expansion of macro 'EXPORT_SYMBOL'
78 | EXPORT_SYMBOL(complete_all);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:67:6: note: previous definition of 'complete_all' with type 'void(struct completion *)'
67 | void complete_all(struct completion *x)
| ^~~~~~~~~~~~
>> kernel/sched/completion.c:81:1: error: invalid storage class for function 'do_wait_for_common'
81 | do_wait_for_common(struct completion *x,
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/completion.c:108:1: error: invalid storage class for function '__wait_for_common'
108 | __wait_for_common(struct completion *x,
| ^~~~~~~~~~~~~~~~~
>> kernel/sched/completion.c:125:1: error: invalid storage class for function 'wait_for_common'
125 | wait_for_common(struct completion *x, long timeout, int state)
| ^~~~~~~~~~~~~~~
>> kernel/sched/completion.c:131:1: error: invalid storage class for function 'wait_for_common_io'
131 | wait_for_common_io(struct completion *x, long timeout, int state)
| ^~~~~~~~~~~~~~~~~~
>> kernel/sched/completion.c:150:15: error: non-static declaration of 'wait_for_completion' follows static declaration
150 | EXPORT_SYMBOL(wait_for_completion);
| ^~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:150:1: note: in expansion of macro 'EXPORT_SYMBOL'
150 | EXPORT_SYMBOL(wait_for_completion);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:146:14: note: previous definition of 'wait_for_completion' with type 'void(struct completion *)'
146 | void __sched wait_for_completion(struct completion *x)
| ^~~~~~~~~~~~~~~~~~~
>> kernel/sched/completion.c:169:15: error: non-static declaration of 'wait_for_completion_timeout' follows static declaration
169 | EXPORT_SYMBOL(wait_for_completion_timeout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:169:1: note: in expansion of macro 'EXPORT_SYMBOL'
169 | EXPORT_SYMBOL(wait_for_completion_timeout);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:165:1: note: previous definition of 'wait_for_completion_timeout' with type 'long unsigned int(struct completion *, long unsigned int)'
165 | wait_for_completion_timeout(struct completion *x, unsigned long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> kernel/sched/completion.c:183:15: error: non-static declaration of 'wait_for_completion_io' follows static declaration
183 | EXPORT_SYMBOL(wait_for_completion_io);
| ^~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:183:1: note: in expansion of macro 'EXPORT_SYMBOL'
183 | EXPORT_SYMBOL(wait_for_completion_io);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:179:14: note: previous definition of 'wait_for_completion_io' with type 'void(struct completion *)'
179 | void __sched wait_for_completion_io(struct completion *x)
| ^~~~~~~~~~~~~~~~~~~~~~
kernel/sched/completion.c:203:15: error: non-static declaration of 'wait_for_completion_io_timeout' follows static declaration
203 | EXPORT_SYMBOL(wait_for_completion_io_timeout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:203:1: note: in expansion of macro 'EXPORT_SYMBOL'
203 | EXPORT_SYMBOL(wait_for_completion_io_timeout);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:199:1: note: previous definition of 'wait_for_completion_io_timeout' with type 'long unsigned int(struct completion *, long unsigned int)'
199 | wait_for_completion_io_timeout(struct completion *x, unsigned long timeout)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/completion.c:222:15: error: non-static declaration of 'wait_for_completion_interruptible' follows static declaration
222 | EXPORT_SYMBOL(wait_for_completion_interruptible);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:222:1: note: in expansion of macro 'EXPORT_SYMBOL'
222 | EXPORT_SYMBOL(wait_for_completion_interruptible);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:214:13: note: previous definition of 'wait_for_completion_interruptible' with type 'int(struct completion *)'
214 | int __sched wait_for_completion_interruptible(struct completion *x)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/completion.c:241:15: error: non-static declaration of 'wait_for_completion_interruptible_timeout' follows static declaration
241 | EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:241:1: note: in expansion of macro 'EXPORT_SYMBOL'
241 | EXPORT_SYMBOL(wait_for_completion_interruptible_timeout);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:236:1: note: previous definition of 'wait_for_completion_interruptible_timeout' with type 'long int(struct completion *, long unsigned int)'
236 | wait_for_completion_interruptible_timeout(struct completion *x,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/completion.c:260:15: error: non-static declaration of 'wait_for_completion_killable' follows static declaration
260 | EXPORT_SYMBOL(wait_for_completion_killable);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:260:1: note: in expansion of macro 'EXPORT_SYMBOL'
260 | EXPORT_SYMBOL(wait_for_completion_killable);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:252:13: note: previous definition of 'wait_for_completion_killable' with type 'int(struct completion *)'
252 | int __sched wait_for_completion_killable(struct completion *x)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/completion.c:270:15: error: non-static declaration of 'wait_for_completion_state' follows static declaration
270 | EXPORT_SYMBOL(wait_for_completion_state);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:270:1: note: in expansion of macro 'EXPORT_SYMBOL'
270 | EXPORT_SYMBOL(wait_for_completion_state);
| ^~~~~~~~~~~~~
kernel/sched/completion.c:262:13: note: previous definition of 'wait_for_completion_state' with type 'int(struct completion *, unsigned int)'
262 | int __sched wait_for_completion_state(struct completion *x, unsigned int state)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
kernel/sched/completion.c:290:15: error: non-static declaration of 'wait_for_completion_killable_timeout' follows static declaration
290 | EXPORT_SYMBOL(wait_for_completion_killable_timeout);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/export.h:74:28: note: in definition of macro '__EXPORT_SYMBOL'
74 | extern typeof(sym) sym; \
| ^~~
include/linux/export.h:86:41: note: in expansion of macro '_EXPORT_SYMBOL'
86 | #define EXPORT_SYMBOL(sym) _EXPORT_SYMBOL(sym, "")
| ^~~~~~~~~~~~~~
kernel/sched/completion.c:290:1: note: in expansion of macro 'EXPORT_SYMBOL'
290 | EXPORT_SYMBOL(wait_for_completion_killable_timeout);


vim +/SEQ_printf +1129 kernel/sched/debug.c

c006fac556e401 Paul Turner 2021-04-16 1120
c006fac556e401 Paul Turner 2021-04-16 1121 void resched_latency_warn(int cpu, u64 latency)
c006fac556e401 Paul Turner 2021-04-16 1122 {
c006fac556e401 Paul Turner 2021-04-16 1123 static DEFINE_RATELIMIT_STATE(latency_check_ratelimit, 60 * 60 * HZ, 1);
c006fac556e401 Paul Turner 2021-04-16 1124
c006fac556e401 Paul Turner 2021-04-16 1125 WARN(__ratelimit(&latency_check_ratelimit),
c006fac556e401 Paul Turner 2021-04-16 1126 "sched: CPU %d need_resched set for > %llu ns (%d ticks) "
c006fac556e401 Paul Turner 2021-04-16 1127 "without schedule\n",
c006fac556e401 Paul Turner 2021-04-16 1128 cpu, latency, cpu_rq(cpu)->ticks_without_resched);
c006fac556e401 Paul Turner 2021-04-16 @1129 }

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki