* [peterz-queue:sched/urgent 1/1] kernel/sched/fair.c:4771:8: error: implicit declaration of function 'cfs_rq_is_decayed'
@ 2021-06-14 18:37 kernel test robot
2021-06-14 19:28 ` Vincent Guittot
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2021-06-14 18:37 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 2798 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/urgent
head: 75f33978239fe8a05ffb95f301eccb166699ac49
commit: 75f33978239fe8a05ffb95f301eccb166699ac49 [1/1] sched/fair: Correctly insert cfs_rq's to list on unthrottle
config: x86_64-randconfig-a015-20210613 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
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
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=75f33978239fe8a05ffb95f301eccb166699ac49
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/urgent
git checkout 75f33978239fe8a05ffb95f301eccb166699ac49
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
kernel/sched/fair.c:637:5: warning: no previous prototype for function 'sched_update_scaling' [-Wmissing-prototypes]
int sched_update_scaling(void)
^
kernel/sched/fair.c:637:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int sched_update_scaling(void)
^
static
>> kernel/sched/fair.c:4771:8: error: implicit declaration of function 'cfs_rq_is_decayed' [-Werror,-Wimplicit-function-declaration]
if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running)
^
1 warning and 1 error generated.
vim +/cfs_rq_is_decayed +4771 kernel/sched/fair.c
4759
4760 static int tg_unthrottle_up(struct task_group *tg, void *data)
4761 {
4762 struct rq *rq = data;
4763 struct cfs_rq *cfs_rq = tg->cfs_rq[cpu_of(rq)];
4764
4765 cfs_rq->throttle_count--;
4766 if (!cfs_rq->throttle_count) {
4767 cfs_rq->throttled_clock_task_time += rq_clock_task(rq) -
4768 cfs_rq->throttled_clock_task;
4769
4770 /* Add cfs_rq with load or one or more already running entities to the list */
> 4771 if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running)
4772 list_add_leaf_cfs_rq(cfs_rq);
4773 }
4774
4775 return 0;
4776 }
4777
---
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: 41895 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [peterz-queue:sched/urgent 1/1] kernel/sched/fair.c:4771:8: error: implicit declaration of function 'cfs_rq_is_decayed'
2021-06-14 18:37 [peterz-queue:sched/urgent 1/1] kernel/sched/fair.c:4771:8: error: implicit declaration of function 'cfs_rq_is_decayed' kernel test robot
@ 2021-06-14 19:28 ` Vincent Guittot
2021-06-14 20:59 ` Peter Zijlstra
0 siblings, 1 reply; 3+ messages in thread
From: Vincent Guittot @ 2021-06-14 19:28 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 3688 bytes --]
Le mardi 15 juin 2021 à 02:37:46 (+0800), kernel test robot a écrit :
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/urgent
> head: 75f33978239fe8a05ffb95f301eccb166699ac49
> commit: 75f33978239fe8a05ffb95f301eccb166699ac49 [1/1] sched/fair: Correctly insert cfs_rq's to list on unthrottle
> config: x86_64-randconfig-a015-20210613 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
> 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
> # install x86_64 cross compiling tool for clang build
> # apt-get install binutils-x86-64-linux-gnu
> # https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=75f33978239fe8a05ffb95f301eccb166699ac49
> git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
> git fetch --no-tags peterz-queue sched/urgent
> git checkout 75f33978239fe8a05ffb95f301eccb166699ac49
> # save the attached .config to linux build tree
> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
>
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> kernel/sched/fair.c:637:5: warning: no previous prototype for function 'sched_update_scaling' [-Wmissing-prototypes]
> int sched_update_scaling(void)
> ^
> kernel/sched/fair.c:637:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
> int sched_update_scaling(void)
> ^
> static
> >> kernel/sched/fair.c:4771:8: error: implicit declaration of function 'cfs_rq_is_decayed' [-Werror,-Wimplicit-function-declaration]
> if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running)
> ^
> 1 warning and 1 error generated.
It's the !SMP case for which PELT is disabled. The below fixes the problem:
---
kernel/sched/fair.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 62a884a652cc..4f7df0e9d198 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -4062,6 +4062,11 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq)
#else /* CONFIG_SMP */
+static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
+{
+ return true;
+}
+
#define UPDATE_TG 0x0
#define SKIP_AGE_LOAD 0x0
#define DO_ATTACH 0x0
--
Peter do you prefer a new version of the patch or you will add this fix directly ?
>
>
> vim +/cfs_rq_is_decayed +4771 kernel/sched/fair.c
>
> 4759
> 4760 static int tg_unthrottle_up(struct task_group *tg, void *data)
> 4761 {
> 4762 struct rq *rq = data;
> 4763 struct cfs_rq *cfs_rq = tg->cfs_rq[cpu_of(rq)];
> 4764
> 4765 cfs_rq->throttle_count--;
> 4766 if (!cfs_rq->throttle_count) {
> 4767 cfs_rq->throttled_clock_task_time += rq_clock_task(rq) -
> 4768 cfs_rq->throttled_clock_task;
> 4769
> 4770 /* Add cfs_rq with load or one or more already running entities to the list */
> > 4771 if (!cfs_rq_is_decayed(cfs_rq) || cfs_rq->nr_running)
> 4772 list_add_leaf_cfs_rq(cfs_rq);
> 4773 }
> 4774
> 4775 return 0;
> 4776 }
> 4777
>
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [peterz-queue:sched/urgent 1/1] kernel/sched/fair.c:4771:8: error: implicit declaration of function 'cfs_rq_is_decayed'
2021-06-14 19:28 ` Vincent Guittot
@ 2021-06-14 20:59 ` Peter Zijlstra
0 siblings, 0 replies; 3+ messages in thread
From: Peter Zijlstra @ 2021-06-14 20:59 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
On Mon, Jun 14, 2021 at 09:28:34PM +0200, Vincent Guittot wrote:
> It's the !SMP case for which PELT is disabled. The below fixes the problem:
>
> ---
> kernel/sched/fair.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
> index 62a884a652cc..4f7df0e9d198 100644
> --- a/kernel/sched/fair.c
> +++ b/kernel/sched/fair.c
> @@ -4062,6 +4062,11 @@ static inline void update_misfit_status(struct task_struct *p, struct rq *rq)
>
> #else /* CONFIG_SMP */
>
> +static inline bool cfs_rq_is_decayed(struct cfs_rq *cfs_rq)
> +{
> + return true;
> +}
> +
> #define UPDATE_TG 0x0
> #define SKIP_AGE_LOAD 0x0
> #define DO_ATTACH 0x0
> --
>
> Peter do you prefer a new version of the patch or you will add this fix directly ?
I folded it in, will push out a new version in a minute or so. Hopefully
all will be well, and I'll push out to tip tomorrow.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-06-14 20:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-14 18:37 [peterz-queue:sched/urgent 1/1] kernel/sched/fair.c:4771:8: error: implicit declaration of function 'cfs_rq_is_decayed' kernel test robot
2021-06-14 19:28 ` Vincent Guittot
2021-06-14 20:59 ` Peter Zijlstra
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.