tree:
https://chromium.googlesource.com/chromiumos/third_party/kernel chromeos-4.19
head: 0bd0742aae0ae9f23b26be2795b8458191236b5b
commit: 9238e47da086f0075b28712a867544a7cda5e9e1 [56/57] FIXUP: FROMLIST: sched/fair: core
wide vruntime comparison
config: c6x-randconfig-r023-20200622 (attached as .config)
compiler: c6x-elf-gcc (GCC) 9.3.0
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
git checkout 9238e47da086f0075b28712a867544a7cda5e9e1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=c6x
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 >>, old ones prefixed by <<):
kernel/sched/fair.c: In function 'cfs_prio_less':
> kernel/sched/fair.c:535:22: warning: variable 'p' set but
not used [-Wunused-but-set-variable]
535 | struct task_struct *p;
| ^
At top level:
kernel/sched/fair.c:7650:1: warning: 'pick_task_fair' defined but not used
[-Wunused-function]
7650 | pick_task_fair(struct rq *rq)
| ^~~~~~~~~~~~~~
vim +/p +535 kernel/sched/fair.c
1727d28632e4f12 Aaron Lu 2019-07-25 528
231822f7cf32291 Guenter Roeck 2020-06-16 529 #ifdef CONFIG_FAIR_GROUP_SCHED
1727d28632e4f12 Aaron Lu 2019-07-25 530 bool cfs_prio_less(struct task_struct *a,
struct task_struct *b)
1727d28632e4f12 Aaron Lu 2019-07-25 531 {
1727d28632e4f12 Aaron Lu 2019-07-25 532 struct sched_entity *sea = &a->se;
1727d28632e4f12 Aaron Lu 2019-07-25 533 struct sched_entity *seb = &b->se;
1727d28632e4f12 Aaron Lu 2019-07-25 534 bool samecpu = task_cpu(a) ==
task_cpu(b);
1727d28632e4f12 Aaron Lu 2019-07-25 @535 struct task_struct *p;
1727d28632e4f12 Aaron Lu 2019-07-25 536 s64 delta;
1727d28632e4f12 Aaron Lu 2019-07-25 537
1727d28632e4f12 Aaron Lu 2019-07-25 538 if (samecpu) {
1727d28632e4f12 Aaron Lu 2019-07-25 539 /* vruntime is per cfs_rq */
1727d28632e4f12 Aaron Lu 2019-07-25 540 while (!is_same_group(sea, seb)) {
1727d28632e4f12 Aaron Lu 2019-07-25 541 int sea_depth = sea->depth;
1727d28632e4f12 Aaron Lu 2019-07-25 542 int seb_depth = seb->depth;
1727d28632e4f12 Aaron Lu 2019-07-25 543
1727d28632e4f12 Aaron Lu 2019-07-25 544 if (sea_depth >= seb_depth)
1727d28632e4f12 Aaron Lu 2019-07-25 545 sea = parent_entity(sea);
1727d28632e4f12 Aaron Lu 2019-07-25 546 if (sea_depth <= seb_depth)
1727d28632e4f12 Aaron Lu 2019-07-25 547 seb = parent_entity(seb);
1727d28632e4f12 Aaron Lu 2019-07-25 548 }
1727d28632e4f12 Aaron Lu 2019-07-25 549
1727d28632e4f12 Aaron Lu 2019-07-25 550 delta = (s64)(sea->vruntime -
seb->vruntime);
1727d28632e4f12 Aaron Lu 2019-07-25 551 goto out;
1727d28632e4f12 Aaron Lu 2019-07-25 552 }
1727d28632e4f12 Aaron Lu 2019-07-25 553
1727d28632e4f12 Aaron Lu 2019-07-25 554 /* crosscpu: compare root level se's
vruntime to decide priority */
1727d28632e4f12 Aaron Lu 2019-07-25 555 while (sea->parent)
1727d28632e4f12 Aaron Lu 2019-07-25 556 sea = sea->parent;
1727d28632e4f12 Aaron Lu 2019-07-25 557 while (seb->parent)
1727d28632e4f12 Aaron Lu 2019-07-25 558 seb = seb->parent;
1727d28632e4f12 Aaron Lu 2019-07-25 559 delta = (s64)(sea->vruntime -
seb->vruntime);
1727d28632e4f12 Aaron Lu 2019-07-25 560
1727d28632e4f12 Aaron Lu 2019-07-25 561 out:
1727d28632e4f12 Aaron Lu 2019-07-25 562 p = delta > 0 ? b : a;
1727d28632e4f12 Aaron Lu 2019-07-25 563
1727d28632e4f12 Aaron Lu 2019-07-25 564 return delta > 0;
1727d28632e4f12 Aaron Lu 2019-07-25 565 }
231822f7cf32291 Guenter Roeck 2020-06-16 566 #endif /* CONFIG_FAIR_GROUP_SCHED */
1727d28632e4f12 Aaron Lu 2019-07-25 567
:::::: The code at line 535 was first introduced by commit
:::::: 1727d28632e4f124f314bc19ad4f40ec183fe60e FROMLIST: sched/fair: core wide vruntime
comparison
:::::: TO: Aaron Lu <aaron.lu(a)linux.alibaba.com>
:::::: CC: Commit Bot <commit-bot(a)chromium.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org