Hi Vincent, I love your patch! Perhaps something to improve: [auto build test WARNING on tip/sched/core] [also build test WARNING on tip/master linux/master linus/master v5.13-rc3 next-20210527] [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] url: https://github.com/0day-ci/linux/commits/Vincent-Guittot/schd-fair-fix-stalled-cfs_rq-tg_load_avg_contrib/20210527-203115 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git a8ea6fc9b089156d9230bfeef964dd9be101a4a9 config: s390-randconfig-c024-20210527 (attached as .config) compiler: s390-linux-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 # https://github.com/0day-ci/linux/commit/725167b3ef5a796c98add27cb21e543c7b72cf0e git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Vincent-Guittot/schd-fair-fix-stalled-cfs_rq-tg_load_avg_contrib/20210527-203115 git checkout 725167b3ef5a796c98add27cb21e543c7b72cf0e # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): kernel/sched/fair.c: In function 'update_tg_cfs_load': >> kernel/sched/fair.c:3459:6: warning: variable 'delta_sum' set but not used [-Wunused-but-set-variable] 3459 | s64 delta_sum; | ^~~~~~~~~ vim +/delta_sum +3459 kernel/sched/fair.c 9f68395333ad7f Vincent Guittot 2020-02-24 3452 09a43ace1f986b Vincent Guittot 2016-11-08 3453 static inline void 0dacee1bfa70e1 Vincent Guittot 2020-02-24 3454 update_tg_cfs_load(struct cfs_rq *cfs_rq, struct sched_entity *se, struct cfs_rq *gcfs_rq) 09a43ace1f986b Vincent Guittot 2016-11-08 3455 { a4c3c04974d648 Vincent Guittot 2017-11-16 3456 long delta_avg, running_sum, runnable_sum = gcfs_rq->prop_runnable_sum; 0dacee1bfa70e1 Vincent Guittot 2020-02-24 3457 unsigned long load_avg; 0dacee1bfa70e1 Vincent Guittot 2020-02-24 3458 u64 load_sum = 0; a4c3c04974d648 Vincent Guittot 2017-11-16 @3459 s64 delta_sum; 95d685935a2edf Vincent Guittot 2020-05-06 3460 u32 divider; 09a43ace1f986b Vincent Guittot 2016-11-08 3461 0e2d2aaaae52c2 Peter Zijlstra 2017-05-08 3462 if (!runnable_sum) 0e2d2aaaae52c2 Peter Zijlstra 2017-05-08 3463 return; 09a43ace1f986b Vincent Guittot 2016-11-08 3464 0e2d2aaaae52c2 Peter Zijlstra 2017-05-08 3465 gcfs_rq->prop_runnable_sum = 0; 09a43ace1f986b Vincent Guittot 2016-11-08 3466 95d685935a2edf Vincent Guittot 2020-05-06 3467 /* 95d685935a2edf Vincent Guittot 2020-05-06 3468 * cfs_rq->avg.period_contrib can be used for both cfs_rq and se. 95d685935a2edf Vincent Guittot 2020-05-06 3469 * See ___update_load_avg() for details. 95d685935a2edf Vincent Guittot 2020-05-06 3470 */ 87e867b4269f29 Vincent Guittot 2020-06-12 3471 divider = get_pelt_divider(&cfs_rq->avg); 95d685935a2edf Vincent Guittot 2020-05-06 3472 a4c3c04974d648 Vincent Guittot 2017-11-16 3473 if (runnable_sum >= 0) { a4c3c04974d648 Vincent Guittot 2017-11-16 3474 /* a4c3c04974d648 Vincent Guittot 2017-11-16 3475 * Add runnable; clip at LOAD_AVG_MAX. Reflects that until a4c3c04974d648 Vincent Guittot 2017-11-16 3476 * the CPU is saturated running == runnable. a4c3c04974d648 Vincent Guittot 2017-11-16 3477 */ a4c3c04974d648 Vincent Guittot 2017-11-16 3478 runnable_sum += se->avg.load_sum; 95d685935a2edf Vincent Guittot 2020-05-06 3479 runnable_sum = min_t(long, runnable_sum, divider); a4c3c04974d648 Vincent Guittot 2017-11-16 3480 } else { a4c3c04974d648 Vincent Guittot 2017-11-16 3481 /* a4c3c04974d648 Vincent Guittot 2017-11-16 3482 * Estimate the new unweighted runnable_sum of the gcfs_rq by a4c3c04974d648 Vincent Guittot 2017-11-16 3483 * assuming all tasks are equally runnable. a4c3c04974d648 Vincent Guittot 2017-11-16 3484 */ a4c3c04974d648 Vincent Guittot 2017-11-16 3485 if (scale_load_down(gcfs_rq->load.weight)) { a4c3c04974d648 Vincent Guittot 2017-11-16 3486 load_sum = div_s64(gcfs_rq->avg.load_sum, a4c3c04974d648 Vincent Guittot 2017-11-16 3487 scale_load_down(gcfs_rq->load.weight)); a4c3c04974d648 Vincent Guittot 2017-11-16 3488 } a4c3c04974d648 Vincent Guittot 2017-11-16 3489 a4c3c04974d648 Vincent Guittot 2017-11-16 3490 /* But make sure to not inflate se's runnable */ a4c3c04974d648 Vincent Guittot 2017-11-16 3491 runnable_sum = min(se->avg.load_sum, load_sum); a4c3c04974d648 Vincent Guittot 2017-11-16 3492 } a4c3c04974d648 Vincent Guittot 2017-11-16 3493 a4c3c04974d648 Vincent Guittot 2017-11-16 3494 /* a4c3c04974d648 Vincent Guittot 2017-11-16 3495 * runnable_sum can't be lower than running_sum 23127296889fe8 Vincent Guittot 2019-01-23 3496 * Rescale running sum to be in the same range as runnable sum 23127296889fe8 Vincent Guittot 2019-01-23 3497 * running_sum is in [0 : LOAD_AVG_MAX << SCHED_CAPACITY_SHIFT] 23127296889fe8 Vincent Guittot 2019-01-23 3498 * runnable_sum is in [0 : LOAD_AVG_MAX] a4c3c04974d648 Vincent Guittot 2017-11-16 3499 */ 23127296889fe8 Vincent Guittot 2019-01-23 3500 running_sum = se->avg.util_sum >> SCHED_CAPACITY_SHIFT; a4c3c04974d648 Vincent Guittot 2017-11-16 3501 runnable_sum = max(runnable_sum, running_sum); a4c3c04974d648 Vincent Guittot 2017-11-16 3502 0e2d2aaaae52c2 Peter Zijlstra 2017-05-08 3503 load_sum = (s64)se_weight(se) * runnable_sum; 95d685935a2edf Vincent Guittot 2020-05-06 3504 load_avg = div_s64(load_sum, divider); 09a43ace1f986b Vincent Guittot 2016-11-08 3505 a4c3c04974d648 Vincent Guittot 2017-11-16 3506 delta_sum = load_sum - (s64)se_weight(se) * se->avg.load_sum; a4c3c04974d648 Vincent Guittot 2017-11-16 3507 delta_avg = load_avg - se->avg.load_avg; 09a43ace1f986b Vincent Guittot 2016-11-08 3508 a4c3c04974d648 Vincent Guittot 2017-11-16 3509 se->avg.load_sum = runnable_sum; a4c3c04974d648 Vincent Guittot 2017-11-16 3510 se->avg.load_avg = load_avg; a4c3c04974d648 Vincent Guittot 2017-11-16 3511 add_positive(&cfs_rq->avg.load_avg, delta_avg); 725167b3ef5a79 Vincent Guittot 2021-05-27 3512 cfs_rq->avg.load_sum = cfs_rq->avg.load_avg * divider; 725167b3ef5a79 Vincent Guittot 2021-05-27 3513 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org