CC: [email protected]
TO: Qais Yousef <[email protected]>

tree:   https://github.com/qais-yousef/linux pelt-halflife-sysctl
head:   c35bd693d02f8a88f3ea301c880a70361dd6d15f
commit: c35bd693d02f8a88f3ea301c880a70361dd6d15f [12/12] sched/pelt: use static 
keys to avoid extra accesses
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: x86_64-randconfig-m001-20210130 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>

smatch warnings:
kernel/sched/pelt.h:180 update_idle_rq_clock_pelt() error: uninitialized symbol 
'divider'.
kernel/sched/pelt.c:150 __accumulate_pelt_segments() error: uninitialized 
symbol 'c2'.

vim +/divider +180 kernel/sched/pelt.h

23127296889fe8 Vincent Guittot 2019-01-23  146  
23127296889fe8 Vincent Guittot 2019-01-23  147  /*
23127296889fe8 Vincent Guittot 2019-01-23  148   * When rq becomes idle, we 
have to check if it has lost idle time
23127296889fe8 Vincent Guittot 2019-01-23  149   * because it was fully busy. A 
rq is fully used when the /Sum util_sum
23127296889fe8 Vincent Guittot 2019-01-23  150   * is greater or equal to:
23127296889fe8 Vincent Guittot 2019-01-23  151   * (LOAD_AVG_MAX - 1024 + 
rq->cfs.avg.period_contrib) << SCHED_CAPACITY_SHIFT;
23127296889fe8 Vincent Guittot 2019-01-23  152   * For optimization and 
computing rounding purpose, we don't take into account
23127296889fe8 Vincent Guittot 2019-01-23  153   * the position in the current 
window (period_contrib) and we use the higher
23127296889fe8 Vincent Guittot 2019-01-23  154   * bound of util_sum to decide.
23127296889fe8 Vincent Guittot 2019-01-23  155   */
23127296889fe8 Vincent Guittot 2019-01-23  156  static inline void 
update_idle_rq_clock_pelt(struct rq *rq)
23127296889fe8 Vincent Guittot 2019-01-23  157  {
c35bd693d02f8a Qais Yousef     2021-01-29  158          u32 divider, util_sum;
c35bd693d02f8a Qais Yousef     2021-01-29  159  
c35bd693d02f8a Qais Yousef     2021-01-29  160          util_sum = 
rq->cfs.avg.util_sum;
23127296889fe8 Vincent Guittot 2019-01-23  161          util_sum += 
rq->avg_rt.util_sum;
23127296889fe8 Vincent Guittot 2019-01-23  162          util_sum += 
rq->avg_dl.util_sum;
23127296889fe8 Vincent Guittot 2019-01-23  163  
c35bd693d02f8a Qais Yousef     2021-01-29  164          if 
(static_branch_likely(&pelt_halflife_32))
c35bd693d02f8a Qais Yousef     2021-01-29  165                  divider = 
((LOAD_AVG_MAX_32 - 1024) << SCHED_CAPACITY_SHIFT) - LOAD_AVG_MAX_32;
c35bd693d02f8a Qais Yousef     2021-01-29  166          if 
(static_branch_likely(&pelt_halflife_16))
c35bd693d02f8a Qais Yousef     2021-01-29  167                  divider = 
((LOAD_AVG_MAX_16 - 1024) << SCHED_CAPACITY_SHIFT) - LOAD_AVG_MAX_16;
c35bd693d02f8a Qais Yousef     2021-01-29  168          if 
(static_branch_likely(&pelt_halflife_8))
c35bd693d02f8a Qais Yousef     2021-01-29  169                  divider = 
((LOAD_AVG_MAX_8 - 1024) << SCHED_CAPACITY_SHIFT) - LOAD_AVG_MAX_8;
c35bd693d02f8a Qais Yousef     2021-01-29  170  
23127296889fe8 Vincent Guittot 2019-01-23  171          /*
23127296889fe8 Vincent Guittot 2019-01-23  172           * Reflecting stolen 
time makes sense only if the idle
23127296889fe8 Vincent Guittot 2019-01-23  173           * phase would be 
present at max capacity. As soon as the
23127296889fe8 Vincent Guittot 2019-01-23  174           * utilization of a rq 
has reached the maximum value, it is
23127296889fe8 Vincent Guittot 2019-01-23  175           * considered as an 
always runnig rq without idle time to
23127296889fe8 Vincent Guittot 2019-01-23  176           * steal. This 
potential idle time is considered as lost in
23127296889fe8 Vincent Guittot 2019-01-23  177           * this case. We keep 
track of this lost idle time compare to
23127296889fe8 Vincent Guittot 2019-01-23  178           * rq's clock_task.
23127296889fe8 Vincent Guittot 2019-01-23  179           */
23127296889fe8 Vincent Guittot 2019-01-23 @180          if (util_sum >= divider)
23127296889fe8 Vincent Guittot 2019-01-23  181                  
rq->lost_idle_time += rq_clock_task(rq) - rq->clock_pelt;
23127296889fe8 Vincent Guittot 2019-01-23  182  }
23127296889fe8 Vincent Guittot 2019-01-23  183  

:::::: The code at line 180 was first introduced by commit
:::::: 23127296889fe84b0762b191b5d041e8ba6f2599 sched/fair: Update scale 
invariance of PELT

:::::: TO: Vincent Guittot <[email protected]>
:::::: CC: Ingo Molnar <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to