Re: [PATCH 1/7] sched: warn for high latency with TIF_NEED_RESCHED_LAZY

From: kernel test robot
Date: Sun Oct 13 2024 - 05:44:54 EST


Hi Ankur,

kernel test robot noticed the following build errors:

[auto build test ERROR on paulmck-rcu/dev]
[also build test ERROR on powerpc/next powerpc/fixes tip/sched/core linus/master v6.12-rc2 next-20241011]
[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/Ankur-Arora/sched-warn-for-high-latency-with-TIF_NEED_RESCHED_LAZY/20241010-005819
base: https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git dev
patch link: https://lore.kernel.org/r/20241009165411.3426937-2-ankur.a.arora%40oracle.com
patch subject: [PATCH 1/7] sched: warn for high latency with TIF_NEED_RESCHED_LAZY
config: x86_64-rhel-8.3 (https://download.01.org/0day-ci/archive/20241013/202410131715.HYC3WK5i-lkp@xxxxxxxxx/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241013/202410131715.HYC3WK5i-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/202410131715.HYC3WK5i-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

kernel/sched/core.c: In function 'cpu_resched_latency':
>> kernel/sched/core.c:5528:34: error: implicit declaration of function 'tif_need_resched_lazy'; did you mean 'tif_need_resched'? [-Werror=implicit-function-declaration]
5528 | if ((!need_resched() && !tif_need_resched_lazy()) || !latency_warn_ms)
| ^~~~~~~~~~~~~~~~~~~~~
| tif_need_resched
cc1: some warnings being treated as errors


vim +5528 kernel/sched/core.c

5517
5518 #ifdef CONFIG_SCHED_DEBUG
5519 static u64 cpu_resched_latency(struct rq *rq)
5520 {
5521 int latency_warn_ms = READ_ONCE(sysctl_resched_latency_warn_ms);
5522 u64 resched_latency, now = rq_clock(rq);
5523 static bool warned_once;
5524
5525 if (sysctl_resched_latency_warn_once && warned_once)
5526 return 0;
5527
> 5528 if ((!need_resched() && !tif_need_resched_lazy()) || !latency_warn_ms)
5529 return 0;
5530
5531 if (system_state == SYSTEM_BOOTING)
5532 return 0;
5533
5534 if (!rq->last_seen_need_resched_ns) {
5535 rq->last_seen_need_resched_ns = now;
5536 rq->ticks_without_resched = 0;
5537 return 0;
5538 }
5539
5540 rq->ticks_without_resched++;
5541 resched_latency = now - rq->last_seen_need_resched_ns;
5542 if (resched_latency <= latency_warn_ms * NSEC_PER_MSEC)
5543 return 0;
5544
5545 warned_once = true;
5546
5547 return resched_latency;
5548 }
5549

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