* [zen:5.14/prjc 199/226] kernel/sched/alt_core.c:7144:5: warning: no previous prototype for function 'sched_group_set_shares'
@ 2021-09-28 8:59 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-09-28 8:59 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 18313 bytes --]
tree: https://github.com/zen-kernel/zen-kernel 5.14/prjc
head: bd5633e4daf64e2d775c0ba61a7f68f1a794ce38
commit: 8e79ff69bdee272975f92e45e8b4ecf0690b636e [199/226] sched/alt: [Sync] 2f064a59a11f sched: Change task_struct::state
config: x86_64-randconfig-a002-20210928 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project dc6e8dfdfe7efecfda318d43a06fae18b40eb498)
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/8e79ff69bdee272975f92e45e8b4ecf0690b636e
git remote add zen https://github.com/zen-kernel/zen-kernel
git fetch --no-tags zen 5.14/prjc
git checkout 8e79ff69bdee272975f92e45e8b4ecf0690b636e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
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:868:6: warning: no previous prototype for function 'select_nohz_load_balancer' [-Wmissing-prototypes]
void select_nohz_load_balancer(int stop_tick) {}
^
kernel/sched/alt_core.c:868:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void select_nohz_load_balancer(int stop_tick) {}
^
static
kernel/sched/alt_core.c:870:6: warning: no previous prototype for function 'set_cpu_sd_state_idle' [-Wmissing-prototypes]
void set_cpu_sd_state_idle(void) {}
^
kernel/sched/alt_core.c:870:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void set_cpu_sd_state_idle(void) {}
^
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:1100:19: warning: unused function 'hrtick_enabled' [-Wunused-function]
static inline int hrtick_enabled(struct rq *rq)
^
>> kernel/sched/alt_core.c:1725:19: warning: stack frame size (2072) exceeds limit (2048) in function 'select_task_rq' [-Wframe-larger-than]
static inline int select_task_rq(struct task_struct *p)
^
20 warnings generated.
vim +/sched_group_set_shares +7144 kernel/sched/alt_core.c
f746b5817d3274 Alfred Chen 2019-08-19 7073
f746b5817d3274 Alfred Chen 2019-08-19 @7074 void sched_offline_group(struct task_group *tg)
f746b5817d3274 Alfred Chen 2019-08-19 7075 {
f746b5817d3274 Alfred Chen 2019-08-19 7076 }
f746b5817d3274 Alfred Chen 2019-08-19 7077
f746b5817d3274 Alfred Chen 2019-08-19 7078 static inline struct task_group *css_tg(struct cgroup_subsys_state *css)
f746b5817d3274 Alfred Chen 2019-08-19 7079 {
f746b5817d3274 Alfred Chen 2019-08-19 7080 return css ? container_of(css, struct task_group, css) : NULL;
f746b5817d3274 Alfred Chen 2019-08-19 7081 }
f746b5817d3274 Alfred Chen 2019-08-19 7082
f746b5817d3274 Alfred Chen 2019-08-19 7083 static struct cgroup_subsys_state *
f746b5817d3274 Alfred Chen 2019-08-19 7084 cpu_cgroup_css_alloc(struct cgroup_subsys_state *parent_css)
f746b5817d3274 Alfred Chen 2019-08-19 7085 {
f746b5817d3274 Alfred Chen 2019-08-19 7086 struct task_group *parent = css_tg(parent_css);
f746b5817d3274 Alfred Chen 2019-08-19 7087 struct task_group *tg;
f746b5817d3274 Alfred Chen 2019-08-19 7088
f746b5817d3274 Alfred Chen 2019-08-19 7089 if (!parent) {
f746b5817d3274 Alfred Chen 2019-08-19 7090 /* This is early initialization for the top cgroup */
f746b5817d3274 Alfred Chen 2019-08-19 7091 return &root_task_group.css;
f746b5817d3274 Alfred Chen 2019-08-19 7092 }
f746b5817d3274 Alfred Chen 2019-08-19 7093
f746b5817d3274 Alfred Chen 2019-08-19 7094 tg = sched_create_group(parent);
f746b5817d3274 Alfred Chen 2019-08-19 7095 if (IS_ERR(tg))
f746b5817d3274 Alfred Chen 2019-08-19 7096 return ERR_PTR(-ENOMEM);
f746b5817d3274 Alfred Chen 2019-08-19 7097 return &tg->css;
f746b5817d3274 Alfred Chen 2019-08-19 7098 }
f746b5817d3274 Alfred Chen 2019-08-19 7099
f746b5817d3274 Alfred Chen 2019-08-19 7100 /* Expose task group only after completing cgroup initialization */
f746b5817d3274 Alfred Chen 2019-08-19 7101 static int cpu_cgroup_css_online(struct cgroup_subsys_state *css)
f746b5817d3274 Alfred Chen 2019-08-19 7102 {
f746b5817d3274 Alfred Chen 2019-08-19 7103 struct task_group *tg = css_tg(css);
f746b5817d3274 Alfred Chen 2019-08-19 7104 struct task_group *parent = css_tg(css->parent);
f746b5817d3274 Alfred Chen 2019-08-19 7105
f746b5817d3274 Alfred Chen 2019-08-19 7106 if (parent)
f746b5817d3274 Alfred Chen 2019-08-19 7107 sched_online_group(tg, parent);
f746b5817d3274 Alfred Chen 2019-08-19 7108 return 0;
f746b5817d3274 Alfred Chen 2019-08-19 7109 }
f746b5817d3274 Alfred Chen 2019-08-19 7110
f746b5817d3274 Alfred Chen 2019-08-19 7111 static void cpu_cgroup_css_released(struct cgroup_subsys_state *css)
f746b5817d3274 Alfred Chen 2019-08-19 7112 {
f746b5817d3274 Alfred Chen 2019-08-19 7113 struct task_group *tg = css_tg(css);
f746b5817d3274 Alfred Chen 2019-08-19 7114
f746b5817d3274 Alfred Chen 2019-08-19 7115 sched_offline_group(tg);
f746b5817d3274 Alfred Chen 2019-08-19 7116 }
f746b5817d3274 Alfred Chen 2019-08-19 7117
f746b5817d3274 Alfred Chen 2019-08-19 7118 static void cpu_cgroup_css_free(struct cgroup_subsys_state *css)
f746b5817d3274 Alfred Chen 2019-08-19 7119 {
f746b5817d3274 Alfred Chen 2019-08-19 7120 struct task_group *tg = css_tg(css);
f746b5817d3274 Alfred Chen 2019-08-19 7121
f746b5817d3274 Alfred Chen 2019-08-19 7122 /*
f746b5817d3274 Alfred Chen 2019-08-19 7123 * Relies on the RCU grace period between css_released() and this.
f746b5817d3274 Alfred Chen 2019-08-19 7124 */
f746b5817d3274 Alfred Chen 2019-08-19 7125 sched_free_group(tg);
f746b5817d3274 Alfred Chen 2019-08-19 7126 }
f746b5817d3274 Alfred Chen 2019-08-19 7127
f746b5817d3274 Alfred Chen 2019-08-19 7128 static void cpu_cgroup_fork(struct task_struct *task)
f746b5817d3274 Alfred Chen 2019-08-19 7129 {
f746b5817d3274 Alfred Chen 2019-08-19 7130 }
f746b5817d3274 Alfred Chen 2019-08-19 7131
f746b5817d3274 Alfred Chen 2019-08-19 7132 static int cpu_cgroup_can_attach(struct cgroup_taskset *tset)
f746b5817d3274 Alfred Chen 2019-08-19 7133 {
f746b5817d3274 Alfred Chen 2019-08-19 7134 return 0;
f746b5817d3274 Alfred Chen 2019-08-19 7135 }
f746b5817d3274 Alfred Chen 2019-08-19 7136
f746b5817d3274 Alfred Chen 2019-08-19 7137 static void cpu_cgroup_attach(struct cgroup_taskset *tset)
f746b5817d3274 Alfred Chen 2019-08-19 7138 {
f746b5817d3274 Alfred Chen 2019-08-19 7139 }
f746b5817d3274 Alfred Chen 2019-08-19 7140
f39855f79e9734 Alfred Chen 2021-03-07 7141 #ifdef CONFIG_FAIR_GROUP_SCHED
f39855f79e9734 Alfred Chen 2021-03-07 7142 static DEFINE_MUTEX(shares_mutex);
f39855f79e9734 Alfred Chen 2021-03-07 7143
f39855f79e9734 Alfred Chen 2021-03-07 @7144 int sched_group_set_shares(struct task_group *tg, unsigned long shares)
f39855f79e9734 Alfred Chen 2021-03-07 7145 {
f39855f79e9734 Alfred Chen 2021-03-07 7146 /*
f39855f79e9734 Alfred Chen 2021-03-07 7147 * We can't change the weight of the root cgroup.
f39855f79e9734 Alfred Chen 2021-03-07 7148 */
f39855f79e9734 Alfred Chen 2021-03-07 7149 if (&root_task_group == tg)
f39855f79e9734 Alfred Chen 2021-03-07 7150 return -EINVAL;
f39855f79e9734 Alfred Chen 2021-03-07 7151
f39855f79e9734 Alfred Chen 2021-03-07 7152 shares = clamp(shares, scale_load(MIN_SHARES), scale_load(MAX_SHARES));
f39855f79e9734 Alfred Chen 2021-03-07 7153
f39855f79e9734 Alfred Chen 2021-03-07 7154 mutex_lock(&shares_mutex);
f39855f79e9734 Alfred Chen 2021-03-07 7155 if (tg->shares == shares)
f39855f79e9734 Alfred Chen 2021-03-07 7156 goto done;
f39855f79e9734 Alfred Chen 2021-03-07 7157
f39855f79e9734 Alfred Chen 2021-03-07 7158 tg->shares = shares;
f39855f79e9734 Alfred Chen 2021-03-07 7159 done:
f39855f79e9734 Alfred Chen 2021-03-07 7160 mutex_unlock(&shares_mutex);
f39855f79e9734 Alfred Chen 2021-03-07 7161 return 0;
f39855f79e9734 Alfred Chen 2021-03-07 7162 }
f39855f79e9734 Alfred Chen 2021-03-07 7163
f39855f79e9734 Alfred Chen 2021-03-07 7164 static int cpu_shares_write_u64(struct cgroup_subsys_state *css,
f39855f79e9734 Alfred Chen 2021-03-07 7165 struct cftype *cftype, u64 shareval)
f39855f79e9734 Alfred Chen 2021-03-07 7166 {
f39855f79e9734 Alfred Chen 2021-03-07 7167 if (shareval > scale_load_down(ULONG_MAX))
f39855f79e9734 Alfred Chen 2021-03-07 7168 shareval = MAX_SHARES;
f39855f79e9734 Alfred Chen 2021-03-07 7169 return sched_group_set_shares(css_tg(css), scale_load(shareval));
f39855f79e9734 Alfred Chen 2021-03-07 7170 }
f39855f79e9734 Alfred Chen 2021-03-07 7171
f39855f79e9734 Alfred Chen 2021-03-07 7172 static u64 cpu_shares_read_u64(struct cgroup_subsys_state *css,
f39855f79e9734 Alfred Chen 2021-03-07 7173 struct cftype *cft)
f39855f79e9734 Alfred Chen 2021-03-07 7174 {
f39855f79e9734 Alfred Chen 2021-03-07 7175 struct task_group *tg = css_tg(css);
f39855f79e9734 Alfred Chen 2021-03-07 7176
f39855f79e9734 Alfred Chen 2021-03-07 7177 return (u64) scale_load_down(tg->shares);
f39855f79e9734 Alfred Chen 2021-03-07 7178 }
f39855f79e9734 Alfred Chen 2021-03-07 7179 #endif
f39855f79e9734 Alfred Chen 2021-03-07 7180
f746b5817d3274 Alfred Chen 2019-08-19 7181 static struct cftype cpu_legacy_files[] = {
f39855f79e9734 Alfred Chen 2021-03-07 7182 #ifdef CONFIG_FAIR_GROUP_SCHED
f39855f79e9734 Alfred Chen 2021-03-07 7183 {
f39855f79e9734 Alfred Chen 2021-03-07 7184 .name = "shares",
f39855f79e9734 Alfred Chen 2021-03-07 7185 .read_u64 = cpu_shares_read_u64,
f39855f79e9734 Alfred Chen 2021-03-07 7186 .write_u64 = cpu_shares_write_u64,
f39855f79e9734 Alfred Chen 2021-03-07 7187 },
f39855f79e9734 Alfred Chen 2021-03-07 7188 #endif
f746b5817d3274 Alfred Chen 2019-08-19 7189 { } /* Terminate */
f746b5817d3274 Alfred Chen 2019-08-19 7190 };
f746b5817d3274 Alfred Chen 2019-08-19 7191
f746b5817d3274 Alfred Chen 2019-08-19 7192
f746b5817d3274 Alfred Chen 2019-08-19 7193 static struct cftype cpu_files[] = {
f746b5817d3274 Alfred Chen 2019-08-19 7194 { } /* terminate */
f746b5817d3274 Alfred Chen 2019-08-19 7195 };
f746b5817d3274 Alfred Chen 2019-08-19 7196
f746b5817d3274 Alfred Chen 2019-08-19 7197 static int cpu_extra_stat_show(struct seq_file *sf,
f746b5817d3274 Alfred Chen 2019-08-19 7198 struct cgroup_subsys_state *css)
f746b5817d3274 Alfred Chen 2019-08-19 7199 {
f746b5817d3274 Alfred Chen 2019-08-19 7200 return 0;
f746b5817d3274 Alfred Chen 2019-08-19 7201 }
f746b5817d3274 Alfred Chen 2019-08-19 7202
f746b5817d3274 Alfred Chen 2019-08-19 7203 struct cgroup_subsys cpu_cgrp_subsys = {
f746b5817d3274 Alfred Chen 2019-08-19 7204 .css_alloc = cpu_cgroup_css_alloc,
f746b5817d3274 Alfred Chen 2019-08-19 7205 .css_online = cpu_cgroup_css_online,
f746b5817d3274 Alfred Chen 2019-08-19 7206 .css_released = cpu_cgroup_css_released,
f746b5817d3274 Alfred Chen 2019-08-19 7207 .css_free = cpu_cgroup_css_free,
f746b5817d3274 Alfred Chen 2019-08-19 7208 .css_extra_stat_show = cpu_extra_stat_show,
f746b5817d3274 Alfred Chen 2019-08-19 7209 .fork = cpu_cgroup_fork,
f746b5817d3274 Alfred Chen 2019-08-19 7210 .can_attach = cpu_cgroup_can_attach,
f746b5817d3274 Alfred Chen 2019-08-19 7211 .attach = cpu_cgroup_attach,
f746b5817d3274 Alfred Chen 2019-08-19 7212 .legacy_cftypes = cpu_files,
f746b5817d3274 Alfred Chen 2019-08-19 @7213 .legacy_cftypes = cpu_legacy_files,
f746b5817d3274 Alfred Chen 2019-08-19 7214 .dfl_cftypes = cpu_files,
f746b5817d3274 Alfred Chen 2019-08-19 7215 .early_init = true,
f746b5817d3274 Alfred Chen 2019-08-19 7216 .threaded = true,
f746b5817d3274 Alfred Chen 2019-08-19 7217 };
f746b5817d3274 Alfred Chen 2019-08-19 7218 #endif /* CONFIG_CGROUP_SCHED */
f746b5817d3274 Alfred Chen 2019-08-19 7219
:::::: The code at line 7144 was first introduced by commit
:::::: f39855f79e9734c35dc7c4fac4c68ad7ab895ea3 sched/alt: Implement fake cpu.shares for CGROUP
:::::: TO: Alfred Chen <cchalpha@gmail.com>
:::::: CC: Alfred Chen <cchalpha@gmail.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 34543 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-28 8:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-28 8:59 [zen:5.14/prjc 199/226] kernel/sched/alt_core.c:7144:5: warning: no previous prototype for function 'sched_group_set_shares' kernel test robot
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.