tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/debug
head: 6ee7724cc02b834ea8f67c65d5d30a62e9d952a3
commit: 6ee7724cc02b834ea8f67c65d5d30a62e9d952a3 [11/11] sched: Warn on long periods of
pending need_resched
config: arm-randconfig-r003-20210330 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
3a6365a439ede4b7c65076bb42b1b7dbf72216b5)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
#
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/debug
git checkout 6ee7724cc02b834ea8f67c65d5d30a62e9d952a3
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
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 >>):
> kernel/sched/core.c:4558:35: warning: overflow in expression;
result is -1295421440 with type 'long' [-Winteger-overflow]
if
(now < resched_boot_quiet_sec * NSEC_PER_SEC)
^
kernel/sched/core.c:2910:20: warning: unused function 'rq_has_pinned_tasks'
[-Wunused-function]
static inline bool rq_has_pinned_tasks(struct rq *rq)
^
kernel/sched/core.c:4772:20: warning: unused function 'sched_tick_start'
[-Wunused-function]
static inline void sched_tick_start(int cpu) { }
^
kernel/sched/core.c:4773:20: warning: unused function 'sched_tick_stop'
[-Wunused-function]
static inline void sched_tick_stop(int cpu) { }
^
4 warnings generated.
vim +/long +4558 kernel/sched/core.c
4543
4544 #ifdef CONFIG_SCHED_DEBUG
4545 static u64 resched_latency_check(struct rq *rq)
4546 {
4547 int latency_warn_ms = READ_ONCE(sysctl_resched_latency_warn_ms);
4548 u64 need_resched_latency, now = rq_clock(rq);
4549 static bool warned_once;
4550
4551 if (sysctl_resched_latency_warn_once && warned_once)
4552 return 0;
4553
4554 if (!need_resched() || WARN_ON_ONCE(latency_warn_ms < 2))
4555 return 0;
4556
4557 /* Disable this warning for the first few mins after boot */
4558 if (now < resched_boot_quiet_sec * NSEC_PER_SEC)
4559 return 0;
4560
4561 if (!rq->last_seen_need_resched_ns) {
4562 rq->last_seen_need_resched_ns = now;
4563 rq->ticks_without_resched = 0;
4564 return 0;
4565 }
4566
4567 rq->ticks_without_resched++;
4568 need_resched_latency = now - rq->last_seen_need_resched_ns;
4569 if (need_resched_latency <= latency_warn_ms * NSEC_PER_MSEC)
4570 return 0;
4571
4572 warned_once = true;
4573
4574 return need_resched_latency;
4575 }
4576
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org