tree:
https://github.com/zen-kernel/zen-kernel 5.15/prjc
head: 88afbbeeefd1e9ceca6efea72562fca5fc546daf
commit: 5f4249233a80dbfc638ec1eaa9b68f1039399f66 [199/239] sched/alt: [Sync] 2f064a59a11f
sched: Change task_struct::state
config: i386-randconfig-a005-20211118 (attached as .config)
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/zen-kernel/zen-kernel/commit/5f4249233a80dbfc638ec1eaa...
git remote add zen
https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 5.15/prjc
git checkout 5f4249233a80dbfc638ec1eaa9b68f1039399f66
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
void resched_curr(struct rq *rq)
^
kernel/sched/alt_core.c:830:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void resched_curr(struct rq *rq)
^
static
kernel/sched/alt_core.c:853:6: warning: no previous prototype for function
'resched_cpu' [-Wmissing-prototypes]
void resched_cpu(int cpu)
^
kernel/sched/alt_core.c:853:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void resched_cpu(int cpu)
^
static
kernel/sched/alt_core.c:1053:6: warning: no previous prototype for function
'hrtick_start' [-Wmissing-prototypes]
void hrtick_start(struct rq *rq, u64 delay)
^
kernel/sched/alt_core.c:1053:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void hrtick_start(struct rq *rq, u64 delay)
^
static
kernel/sched/alt_core.c:1744:6: warning: no previous prototype for function
'sched_set_stop_task' [-Wmissing-prototypes]
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
kernel/sched/alt_core.c:1744:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void sched_set_stop_task(int cpu, struct task_struct *stop)
^
static
kernel/sched/alt_core.c:6229:6: warning: no previous prototype for function
'idle_task_exit' [-Wmissing-prototypes]
void idle_task_exit(void)
^
kernel/sched/alt_core.c:6229:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void idle_task_exit(void)
^
static
kernel/sched/alt_core.c:6439:5: warning: no previous prototype for function
'sched_cpu_activate' [-Wmissing-prototypes]
int sched_cpu_activate(unsigned int cpu)
^
kernel/sched/alt_core.c:6439:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int sched_cpu_activate(unsigned int cpu)
^
static
kernel/sched/alt_core.c:6478:5: warning: no previous prototype for function
'sched_cpu_deactivate' [-Wmissing-prototypes]
int sched_cpu_deactivate(unsigned int cpu)
^
kernel/sched/alt_core.c:6478:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int sched_cpu_deactivate(unsigned int cpu)
^
static
kernel/sched/alt_core.c:6542:5: warning: no previous prototype for function
'sched_cpu_starting' [-Wmissing-prototypes]
int sched_cpu_starting(unsigned int cpu)
^
kernel/sched/alt_core.c:6542:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int sched_cpu_starting(unsigned int cpu)
^
static
kernel/sched/alt_core.c:6562:5: warning: no previous prototype for function
'sched_cpu_wait_empty' [-Wmissing-prototypes]
int sched_cpu_wait_empty(unsigned int cpu)
^
kernel/sched/alt_core.c:6562:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int sched_cpu_wait_empty(unsigned int cpu)
^
static
kernel/sched/alt_core.c:6604:5: warning: no previous prototype for function
'sched_cpu_dying' [-Wmissing-prototypes]
int sched_cpu_dying(unsigned int cpu)
^
kernel/sched/alt_core.c:6604:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int sched_cpu_dying(unsigned int cpu)
^
static
kernel/sched/alt_core.c:6851:16: warning: variable 'preempt_disable_ip' set but
not used [-Wunused-but-set-variable]
unsigned long preempt_disable_ip;
^
kernel/sched/alt_core.c:7046:20: warning: no previous prototype for function
'sched_create_group' [-Wmissing-prototypes]
struct task_group *sched_create_group(struct task_group *parent)
^
kernel/sched/alt_core.c:7046:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
struct task_group *sched_create_group(struct task_group *parent)
^
static
kernel/sched/alt_core.c:7057:6: warning: no previous prototype for function
'sched_online_group' [-Wmissing-prototypes]
void sched_online_group(struct task_group *tg, struct task_group *parent)
^
kernel/sched/alt_core.c:7057:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void sched_online_group(struct task_group *tg, struct task_group *parent)
^
static
kernel/sched/alt_core.c:7068:6: warning: no previous prototype for function
'sched_destroy_group' [-Wmissing-prototypes]
void sched_destroy_group(struct task_group *tg)
^
kernel/sched/alt_core.c:7068:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void sched_destroy_group(struct task_group *tg)
^
static
kernel/sched/alt_core.c:7074:6: warning: no previous prototype for function
'sched_offline_group' [-Wmissing-prototypes]
void sched_offline_group(struct task_group *tg)
^
kernel/sched/alt_core.c:7074:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void sched_offline_group(struct task_group *tg)
^
static
> kernel/sched/alt_core.c:7144:5: warning: no previous prototype
for function 'sched_group_set_shares' [-Wmissing-prototypes]
int
sched_group_set_shares(struct task_group *tg, unsigned long shares)
^
kernel/sched/alt_core.c:7144:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
int sched_group_set_shares(struct task_group *tg, unsigned long shares)
^
static
kernel/sched/alt_core.c:7213:20: warning: initializer overrides prior initialization of
this subobject [-Winitializer-overrides]
.legacy_cftypes = cpu_legacy_files,
^~~~~~~~~~~~~~~~
kernel/sched/alt_core.c:7212:20: note: previous initialization is here
.legacy_cftypes = cpu_files,
^~~~~~~~~
kernel/sched/alt_core.c:1014:19: warning: unused function 'hrtick_enabled'
[-Wunused-function]
static inline int hrtick_enabled(struct rq *rq)
^
18 warnings generated.
vim +/sched_group_set_shares +7144 kernel/sched/alt_core.c
cb06db4ef97b1e Alfred Chen 2019-08-19 7073
cb06db4ef97b1e Alfred Chen 2019-08-19 @7074 void sched_offline_group(struct task_group
*tg)
cb06db4ef97b1e Alfred Chen 2019-08-19 7075 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7076 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7077
cb06db4ef97b1e Alfred Chen 2019-08-19 7078 static inline struct task_group
*css_tg(struct cgroup_subsys_state *css)
cb06db4ef97b1e Alfred Chen 2019-08-19 7079 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7080 return css ? container_of(css, struct
task_group, css) : NULL;
cb06db4ef97b1e Alfred Chen 2019-08-19 7081 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7082
cb06db4ef97b1e Alfred Chen 2019-08-19 7083 static struct cgroup_subsys_state *
cb06db4ef97b1e Alfred Chen 2019-08-19 7084 cpu_cgroup_css_alloc(struct
cgroup_subsys_state *parent_css)
cb06db4ef97b1e Alfred Chen 2019-08-19 7085 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7086 struct task_group *parent =
css_tg(parent_css);
cb06db4ef97b1e Alfred Chen 2019-08-19 7087 struct task_group *tg;
cb06db4ef97b1e Alfred Chen 2019-08-19 7088
cb06db4ef97b1e Alfred Chen 2019-08-19 7089 if (!parent) {
cb06db4ef97b1e Alfred Chen 2019-08-19 7090 /* This is early initialization for the top
cgroup */
cb06db4ef97b1e Alfred Chen 2019-08-19 7091 return &root_task_group.css;
cb06db4ef97b1e Alfred Chen 2019-08-19 7092 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7093
cb06db4ef97b1e Alfred Chen 2019-08-19 7094 tg = sched_create_group(parent);
cb06db4ef97b1e Alfred Chen 2019-08-19 7095 if (IS_ERR(tg))
cb06db4ef97b1e Alfred Chen 2019-08-19 7096 return ERR_PTR(-ENOMEM);
cb06db4ef97b1e Alfred Chen 2019-08-19 7097 return &tg->css;
cb06db4ef97b1e Alfred Chen 2019-08-19 7098 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7099
cb06db4ef97b1e Alfred Chen 2019-08-19 7100 /* Expose task group only after completing
cgroup initialization */
cb06db4ef97b1e Alfred Chen 2019-08-19 7101 static int cpu_cgroup_css_online(struct
cgroup_subsys_state *css)
cb06db4ef97b1e Alfred Chen 2019-08-19 7102 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7103 struct task_group *tg = css_tg(css);
cb06db4ef97b1e Alfred Chen 2019-08-19 7104 struct task_group *parent =
css_tg(css->parent);
cb06db4ef97b1e Alfred Chen 2019-08-19 7105
cb06db4ef97b1e Alfred Chen 2019-08-19 7106 if (parent)
cb06db4ef97b1e Alfred Chen 2019-08-19 7107 sched_online_group(tg, parent);
cb06db4ef97b1e Alfred Chen 2019-08-19 7108 return 0;
cb06db4ef97b1e Alfred Chen 2019-08-19 7109 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7110
cb06db4ef97b1e Alfred Chen 2019-08-19 7111 static void cpu_cgroup_css_released(struct
cgroup_subsys_state *css)
cb06db4ef97b1e Alfred Chen 2019-08-19 7112 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7113 struct task_group *tg = css_tg(css);
cb06db4ef97b1e Alfred Chen 2019-08-19 7114
cb06db4ef97b1e Alfred Chen 2019-08-19 7115 sched_offline_group(tg);
cb06db4ef97b1e Alfred Chen 2019-08-19 7116 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7117
cb06db4ef97b1e Alfred Chen 2019-08-19 7118 static void cpu_cgroup_css_free(struct
cgroup_subsys_state *css)
cb06db4ef97b1e Alfred Chen 2019-08-19 7119 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7120 struct task_group *tg = css_tg(css);
cb06db4ef97b1e Alfred Chen 2019-08-19 7121
cb06db4ef97b1e Alfred Chen 2019-08-19 7122 /*
cb06db4ef97b1e Alfred Chen 2019-08-19 7123 * Relies on the RCU grace period between
css_released() and this.
cb06db4ef97b1e Alfred Chen 2019-08-19 7124 */
cb06db4ef97b1e Alfred Chen 2019-08-19 7125 sched_free_group(tg);
cb06db4ef97b1e Alfred Chen 2019-08-19 7126 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7127
cb06db4ef97b1e Alfred Chen 2019-08-19 7128 static void cpu_cgroup_fork(struct
task_struct *task)
cb06db4ef97b1e Alfred Chen 2019-08-19 7129 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7130 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7131
cb06db4ef97b1e Alfred Chen 2019-08-19 7132 static int cpu_cgroup_can_attach(struct
cgroup_taskset *tset)
cb06db4ef97b1e Alfred Chen 2019-08-19 7133 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7134 return 0;
cb06db4ef97b1e Alfred Chen 2019-08-19 7135 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7136
cb06db4ef97b1e Alfred Chen 2019-08-19 7137 static void cpu_cgroup_attach(struct
cgroup_taskset *tset)
cb06db4ef97b1e Alfred Chen 2019-08-19 7138 {
cb06db4ef97b1e Alfred Chen 2019-08-19 7139 }
cb06db4ef97b1e Alfred Chen 2019-08-19 7140
bc4407eb08bf3d Alfred Chen 2021-03-07 7141 #ifdef CONFIG_FAIR_GROUP_SCHED
bc4407eb08bf3d Alfred Chen 2021-03-07 7142 static DEFINE_MUTEX(shares_mutex);
bc4407eb08bf3d Alfred Chen 2021-03-07 7143
bc4407eb08bf3d Alfred Chen 2021-03-07 @7144 int sched_group_set_shares(struct task_group
*tg, unsigned long shares)
bc4407eb08bf3d Alfred Chen 2021-03-07 7145 {
bc4407eb08bf3d Alfred Chen 2021-03-07 7146 /*
bc4407eb08bf3d Alfred Chen 2021-03-07 7147 * We can't change the weight of the
root cgroup.
bc4407eb08bf3d Alfred Chen 2021-03-07 7148 */
bc4407eb08bf3d Alfred Chen 2021-03-07 7149 if (&root_task_group == tg)
bc4407eb08bf3d Alfred Chen 2021-03-07 7150 return -EINVAL;
bc4407eb08bf3d Alfred Chen 2021-03-07 7151
bc4407eb08bf3d Alfred Chen 2021-03-07 7152 shares = clamp(shares,
scale_load(MIN_SHARES), scale_load(MAX_SHARES));
bc4407eb08bf3d Alfred Chen 2021-03-07 7153
bc4407eb08bf3d Alfred Chen 2021-03-07 7154 mutex_lock(&shares_mutex);
bc4407eb08bf3d Alfred Chen 2021-03-07 7155 if (tg->shares == shares)
bc4407eb08bf3d Alfred Chen 2021-03-07 7156 goto done;
bc4407eb08bf3d Alfred Chen 2021-03-07 7157
bc4407eb08bf3d Alfred Chen 2021-03-07 7158 tg->shares = shares;
bc4407eb08bf3d Alfred Chen 2021-03-07 7159 done:
bc4407eb08bf3d Alfred Chen 2021-03-07 7160 mutex_unlock(&shares_mutex);
bc4407eb08bf3d Alfred Chen 2021-03-07 7161 return 0;
bc4407eb08bf3d Alfred Chen 2021-03-07 7162 }
bc4407eb08bf3d Alfred Chen 2021-03-07 7163
:::::: The code at line 7144 was first introduced by commit
:::::: bc4407eb08bf3d99eac4643fe36809e4f987feb2 sched/alt: Implement fake cpu.shares for
CGROUP
:::::: TO: Alfred Chen <cchalpha(a)gmail.com>
:::::: CC: Alfred Chen <cchalpha(a)gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org