Re: [PATCH V1 2/4] sched: Do predict load

From: kernel test robot
Date: Fri Feb 28 2025 - 03:40:07 EST


Hi zihan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tip/sched/core]
[also build test WARNING on akpm-mm/mm-nonmm-unstable brauner-vfs/vfs.all peterz-queue/sched/core linus/master v6.14-rc4 next-20250227]
[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/zihan-zhou/sched-Add-kconfig-of-predict-load/20250221-165850
base: tip/sched/core
patch link: https://lore.kernel.org/r/20250221085051.32468-1-15645113830zzh%40gmail.com
patch subject: [PATCH V1 2/4] sched: Do predict load
config: hexagon-allyesconfig (https://download.01.org/0day-ci/archive/20250228/202502281647.5vhdZuZE-lkp@xxxxxxxxx/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250228/202502281647.5vhdZuZE-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/202502281647.5vhdZuZE-lkp@xxxxxxxxx/

All warnings (new ones prefixed by >>):

>> kernel/sched/fair.c:4755:17: warning: variable 'load' is uninitialized when used here [-Wuninitialized]
4755 | load = div_u64(load * weight, PREDICT_LOAD_MAX);
| ^~~~
kernel/sched/fair.c:4749:20: note: initialize the variable 'load' to silence this warning
4749 | unsigned long load;
| ^
| = 0
1 warning generated.


vim +/load +4755 kernel/sched/fair.c

4746
4747 static unsigned long restore_normalized_load(unsigned long normalized_load, unsigned long weight)
4748 {
4749 unsigned long load;
4750
4751 //Prevent arithmetic overflow
4752 WARN_ON_ONCE(normalized_load > 4000000);
4753 if (weight == PREDICT_LOAD_MAX)
4754 return normalized_load;
> 4755 load = div_u64(load * weight, PREDICT_LOAD_MAX);
4756 return load;
4757 }
4758

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