All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Tejun Heo <tj@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, Andrea Righi <arighi@nvidia.com>
Subject: [tj-sched-ext:scx-bypass-scalability-v2 33/37] kernel/watchdog.c:206:21: error: implicit declaration of function 'scx_hardlockup'; did you mean 'is_hardlockup'?
Date: Tue, 11 Nov 2025 16:41:30 +0100	[thread overview]
Message-ID: <202511111612.jSWrytRN-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-bypass-scalability-v2
head:   27ab0bfd9e10121f25b6dd1b5500c7b627c5d215
commit: 2b9c2213630da8f6f2a256005f9ce9070e39847f [33/37] sched_ext: Hook up hardlockup detector
config: x86_64-rhel-9.4 (https://download.01.org/0day-ci/archive/20251111/202511111612.jSWrytRN-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251111/202511111612.jSWrytRN-lkp@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202511111612.jSWrytRN-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/watchdog.c: In function 'watchdog_hardlockup_check':
>> kernel/watchdog.c:206:21: error: implicit declaration of function 'scx_hardlockup'; did you mean 'is_hardlockup'? [-Wimplicit-function-declaration]
     206 |                 if (scx_hardlockup())
         |                     ^~~~~~~~~~~~~~
         |                     is_hardlockup


vim +206 kernel/watchdog.c

   178	
   179	void watchdog_hardlockup_check(unsigned int cpu, struct pt_regs *regs)
   180	{
   181		if (per_cpu(watchdog_hardlockup_touched, cpu)) {
   182			per_cpu(watchdog_hardlockup_touched, cpu) = false;
   183			return;
   184		}
   185	
   186		/*
   187		 * Check for a hardlockup by making sure the CPU's timer
   188		 * interrupt is incrementing. The timer interrupt should have
   189		 * fired multiple times before we overflow'd. If it hasn't
   190		 * then this is a good indication the cpu is stuck
   191		 */
   192		if (is_hardlockup(cpu)) {
   193			unsigned int this_cpu = smp_processor_id();
   194			unsigned long flags;
   195	
   196	#ifdef CONFIG_SYSFS
   197			++hardlockup_count;
   198	#endif
   199			/*
   200			 * A poorly behaving BPF scheduler can trigger hard lockup by
   201			 * e.g. putting numerous affinitized tasks in a single queue and
   202			 * directing all CPUs at it. The following call can return true
   203			 * only once when sched_ext is enabled and will immediately
   204			 * abort the BPF scheduler and print out a warning message.
   205			 */
 > 206			if (scx_hardlockup())
   207				return;
   208	
   209			/* Only print hardlockups once. */
   210			if (per_cpu(watchdog_hardlockup_warned, cpu))
   211				return;
   212	
   213			/*
   214			 * Prevent multiple hard-lockup reports if one cpu is already
   215			 * engaged in dumping all cpu back traces.
   216			 */
   217			if (sysctl_hardlockup_all_cpu_backtrace) {
   218				if (test_and_set_bit_lock(0, &hard_lockup_nmi_warn))
   219					return;
   220			}
   221	
   222			/*
   223			 * NOTE: we call printk_cpu_sync_get_irqsave() after printing
   224			 * the lockup message. While it would be nice to serialize
   225			 * that printout, we really want to make sure that if some
   226			 * other CPU somehow locked up while holding the lock associated
   227			 * with printk_cpu_sync_get_irqsave() that we can still at least
   228			 * get the message about the lockup out.
   229			 */
   230			pr_emerg("CPU%u: Watchdog detected hard LOCKUP on cpu %u\n", this_cpu, cpu);
   231			printk_cpu_sync_get_irqsave(flags);
   232	
   233			print_modules();
   234			print_irqtrace_events(current);
   235			if (cpu == this_cpu) {
   236				if (regs)
   237					show_regs(regs);
   238				else
   239					dump_stack();
   240				printk_cpu_sync_put_irqrestore(flags);
   241			} else {
   242				printk_cpu_sync_put_irqrestore(flags);
   243				trigger_single_cpu_backtrace(cpu);
   244			}
   245	
   246			if (sysctl_hardlockup_all_cpu_backtrace) {
   247				trigger_allbutcpu_cpu_backtrace(cpu);
   248				if (!hardlockup_panic)
   249					clear_bit_unlock(0, &hard_lockup_nmi_warn);
   250			}
   251	
   252			if (hardlockup_panic)
   253				nmi_panic(regs, "Hard LOCKUP");
   254	
   255			per_cpu(watchdog_hardlockup_warned, cpu) = true;
   256		} else {
   257			per_cpu(watchdog_hardlockup_warned, cpu) = false;
   258		}
   259	}
   260	

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

                 reply	other threads:[~2025-11-11 15:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202511111612.jSWrytRN-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=arighi@nvidia.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.