tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 3124fc8676c43f13e7b133644c8a918e7d5dbf0f
commit: d8ad4c3c8c3417d895aeaf05cb11d3b817e813c5 [6/8] sched: avoid scale real weight down
to zero
config: alpha-defconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.2.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout d8ad4c3c8c3417d895aeaf05cb11d3b817e813c5
# save the attached .config to linux build tree
GCC_VERSION=9.2.0 make.cross ARCH=alpha
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/asm-generic/bug.h:19,
from arch/alpha/include/asm/bug.h:23,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/alpha/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from kernel/sched/sched.h:5,
from kernel/sched/fair.c:23:
kernel/sched/fair.c: In function '__update_inv_weight':
> kernel/sched/sched.h:125:13: error: 'MIN_SHARES'
undeclared (first use in this function)
125 | __w = max(MIN_SHARES, __w
>> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
> kernel/sched/sched.h:125:9: note: in expansion of macro
'max'
125 | __w = max(MIN_SHARES, __w >>
SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/fair.c:209:6: note: in expansion of macro
'scale_load_down'
209 | w = scale_load_down(lw->weight);
| ^~~~~~~~~~~~~~~
kernel/sched/sched.h:125:13: note: each undeclared identifier is reported only once for
each function it appears in
125 | __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
> kernel/sched/sched.h:125:9: note: in expansion of macro
'max'
125 | __w = max(MIN_SHARES, __w >>
SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/fair.c:209:6: note: in expansion of macro
'scale_load_down'
209 | w = scale_load_down(lw->weight);
| ^~~~~~~~~~~~~~~
> include/linux/kernel.h:859:2: error: first argument to
'__builtin_choose_expr' not a constant
859 |
__builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
> kernel/sched/sched.h:125:9: note: in expansion of macro
'max'
125 | __w = max(MIN_SHARES, __w >>
SCHED_FIXEDPOINT_SHIFT); \
| ^~~
> kernel/sched/fair.c:209:6: note: in expansion of macro
'scale_load_down'
209 | w = scale_load_down(lw->weight);
| ^~~~~~~~~~~~~~~
kernel/sched/fair.c: In function '__calc_delta':
> kernel/sched/sched.h:125:13: error: 'MIN_SHARES'
undeclared (first use in this function)
125 | __w = max(MIN_SHARES, __w
>> SCHED_FIXEDPOINT_SHIFT); \
| ^~~~~~~~~~
include/linux/kernel.h:835:22: note: in definition of macro '__typecheck'
835 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/kernel.h:859:24: note: in expansion of macro '__safe_cmp'
859 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
> kernel/sched/sched.h:125:9: note: in expansion of macro
'max'
125 | __w = max(MIN_SHARES, __w >>
SCHED_FIXEDPOINT_SHIFT); \
| ^~~
kernel/sched/fair.c:233:13: note: in expansion of macro 'scale_load_down'
233 | u64 fact = scale_load_down(weight);
| ^~~~~~~~~~~~~~~
> include/linux/kernel.h:859:2: error: first argument to
'__builtin_choose_expr' not a constant
859 |
__builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:875:19: note: in expansion of macro '__careful_cmp'
875 | #define max(x, y) __careful_cmp(x, y, >)
| ^~~~~~~~~~~~~
> kernel/sched/sched.h:125:9: note: in expansion of macro
'max'
125 | __w = max(MIN_SHARES, __w >>
SCHED_FIXEDPOINT_SHIFT); \
| ^~~
kernel/sched/fair.c:233:13: note: in expansion of macro 'scale_load_down'
233 | u64 fact = scale_load_down(weight);
| ^~~~~~~~~~~~~~~
vim +/MIN_SHARES +125 kernel/sched/sched.h
103
104 /*
105 * Increase resolution of nice-level calculations for 64-bit architectures.
106 * The extra resolution improves shares distribution and load balancing of
107 * low-weight task groups (eg. nice +19 on an autogroup), deeper taskgroup
108 * hierarchies, especially on larger systems. This is not a user-visible change
109 * and does not change the user-interface for setting shares/weights.
110 *
111 * We increase resolution only if we have enough bits to allow this increased
112 * resolution (i.e. 64-bit). The costs for increasing resolution when 32-bit
113 * are pretty high and the returns do not justify the increased costs.
114 *
115 * Really only required when CONFIG_FAIR_GROUP_SCHED=y is also set, but to
116 * increase coverage and consistency always enable it on 64-bit platforms.
117 */
118 #ifdef CONFIG_64BIT
119 # define NICE_0_LOAD_SHIFT (SCHED_FIXEDPOINT_SHIFT + SCHED_FIXEDPOINT_SHIFT)
120 # define scale_load(w) ((w) << SCHED_FIXEDPOINT_SHIFT)
121 # define scale_load_down(w) \
122 ({ \
123 unsigned long __w = (w); \
124 if (__w) \
125 __w = max(MIN_SHARES, __w >> SCHED_FIXEDPOINT_SHIFT); \
126 __w; \
127 })
128 #else
129 # define NICE_0_LOAD_SHIFT (SCHED_FIXEDPOINT_SHIFT)
130 # define scale_load(w) (w)
131 # define scale_load_down(w) (w)
132 #endif
133
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org