Re: [PATCH 1/2] sched/core: Introduce sched_class::can_stop_tick()

From: kernel test robot
Date: Thu Aug 24 2023 - 03:45:41 EST


Hi Hao,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on next-20230824]
[cannot apply to linus/master v6.5-rc7]
[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/Hao-Jia/sched-core-Introduce-sched_class-can_stop_tick/20230821-175200
base: tip/sched/core
patch link: https://lore.kernel.org/r/20230821094927.51079-2-jiahao.os%40bytedance.com
patch subject: [PATCH 1/2] sched/core: Introduce sched_class::can_stop_tick()
config: arm64-randconfig-r122-20230824 (https://download.01.org/0day-ci/archive/20230824/202308241526.be4l9ROa-lkp@xxxxxxxxx/config)
compiler: aarch64-linux-gcc (GCC) 12.3.0
reproduce: (https://download.01.org/0day-ci/archive/20230824/202308241526.be4l9ROa-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/202308241526.be4l9ROa-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
kernel/sched/fair.c:702:6: sparse: sparse: symbol 'update_entity_lag' was not declared. Should it be static?
kernel/sched/fair.c:1140:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct sched_entity const *se @@ got struct sched_entity [noderef] __rcu * @@
kernel/sched/fair.c:1140:34: sparse: expected struct sched_entity const *se
kernel/sched/fair.c:1140:34: sparse: got struct sched_entity [noderef] __rcu *
kernel/sched/fair.c:12087:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:12087:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:12087:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:5674:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:5674:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:5674:22: sparse: struct task_struct *
>> kernel/sched/fair.c:6336:56: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/fair.c:6336:56: sparse: expected struct task_struct *p
kernel/sched/fair.c:6336:56: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:6337:47: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/fair.c:6337:47: sparse: expected struct task_struct *p
kernel/sched/fair.c:6337:47: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:6438:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/fair.c:6438:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:6438:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:7738:20: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:7738:20: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:7738:20: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:7940:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] tmp @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:7940:9: sparse: expected struct sched_domain *[assigned] tmp
kernel/sched/fair.c:7940:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:8039:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/fair.c:8039:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:8039:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:8319:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/fair.c:8319:38: sparse: expected struct task_struct *curr
kernel/sched/fair.c:8319:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/fair.c:9312:40: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *child @@ got struct sched_domain [noderef] __rcu *child @@
kernel/sched/fair.c:9312:40: sparse: expected struct sched_domain *child
kernel/sched/fair.c:9312:40: sparse: got struct sched_domain [noderef] __rcu *child
kernel/sched/fair.c:9939:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/fair.c:9939:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/fair.c:9939:22: sparse: struct task_struct *
kernel/sched/fair.c:11359:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:11359:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:11359:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:11018:44: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct sched_domain *sd_parent @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:11018:44: sparse: expected struct sched_domain *sd_parent
kernel/sched/fair.c:11018:44: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c:11455:9: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct sched_domain *[assigned] sd @@ got struct sched_domain [noderef] __rcu *parent @@
kernel/sched/fair.c:11455:9: sparse: expected struct sched_domain *[assigned] sd
kernel/sched/fair.c:11455:9: sparse: got struct sched_domain [noderef] __rcu *parent
kernel/sched/fair.c: note: in included file:
kernel/sched/sched.h:2130:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2130:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2130:25: sparse: struct task_struct *
kernel/sched/sched.h:2296:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2296:9: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2296:9: sparse: struct task_struct *
kernel/sched/sched.h:2130:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2130:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2130:25: sparse: struct task_struct *
kernel/sched/sched.h:2130:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:2130:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:2130:25: sparse: struct task_struct *

vim +6336 kernel/sched/fair.c

6321
6322 static bool can_stop_tick_fair(struct rq *rq, int *stop_next)
6323 {
6324 if (rq->nr_running > 1) {
6325 *stop_next = 1;
6326 return false;
6327 }
6328
6329 /*
6330 * If there is one task and it has CFS runtime bandwidth constraints
6331 * and it's on the cpu now we don't want to stop the tick.
6332 * This check prevents clearing the bit if a newly enqueued task here is
6333 * dequeued by migrating while the constrained task continues to run.
6334 * E.g. going from 2->1 without going through pick_next_task().
6335 */
> 6336 if (sched_feat(HZ_BW) && __need_bw_check(rq, rq->curr)) {
6337 if (cfs_task_bw_constrained(rq->curr)) {
6338 *stop_next = 1;
6339 return false;
6340 }
6341 }
6342
6343 return true;
6344 }
6345 #endif
6346

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