Lines Matching +full:lock +full:- +full:detect +full:- +full:precision +full:- +full:6 +full:ns +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0
3 * Detect hard and soft lockups on a system
9 * Some chunks also taken from the old x86-specific nmi watchdog code, thanks
62 * Should we panic when a soft-lockup or hard-lockup occurs:
67 * We may not want to enable hard lockup detection by default in all cases,
177 * Prevent multiple hard-lockup reports if one cpu is already in watchdog_hardlockup_check()
189 * other CPU somehow locked up while holding the lock associated in watchdog_hardlockup_check()
242 * Watchdog-detector specific API.
250 return -ENODEV; in watchdog_hardlockup_probe()
254 * watchdog_hardlockup_stop - Stop the watchdog for reconfiguration
264 * watchdog_hardlockup_start - Start the watchdog after reconfiguration
270 * - watchdog_enabled
271 * - watchdog_thresh
272 * - watchdog_cpumask
277 * lockup_detector_update_enable - Update the sysctl enable bit
372 * sufficient for our precision, allowing us to use u16 to store
374 * 2^24 ~= 16 * 10^6
378 return data_ns >> 24LL; /* 2^24ns ~= 16.8ms */ in get_16bit_precision()
396 util = DIV_ROUND_UP(100 * (new_stat - old_stat), sample_period_16); in update_cpustat()
462 tail = (tail + NUM_HARDIRQ_REPORT - 1) % NUM_HARDIRQ_REPORT; in need_counting_irqs()
484 {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0}, {-1, 0} in print_irq_counts()
498 printk(KERN_CRIT "CPU#%d Detect HardIRQ Time exceeds %d%%. Most frequent HardIRQs:\n", in print_irq_counts()
502 if (irq_counts_sorted[i].irq == -1) in print_irq_counts()
505 printk(KERN_CRIT "\t#%u: %-10u\tirq#%d\n", in print_irq_counts()
533 * Hard-lockup warnings should be triggered after just a few seconds. Soft-
547 * 2^30ns == 1.074s.
557 * convert watchdog_thresh from seconds to ns in set_sample_period()
580 * touch_softlockup_watchdog_sched - touch watchdog on scheduler stalls
583 * preventing the watchdog task from executing - e.g. the scheduler
646 * A poorly behaving BPF scheduler can live-lock the system into in is_softlockup()
651 scx_softlockup(now - touch_ts); in is_softlockup()
655 return now - touch_ts; in is_softlockup()
665 * The watchdog feed function - touches the timestamp.
669 * for more than 2*watchdog_thresh seconds then the debug-printout
746 * Prevent multiple soft-lockup reports if one cpu is already in watchdog_timer_fn()
758 pr_emerg("BUG: soft lockup - CPU#%d stuck for %us! [%s:%d]\n", in watchdog_timer_fn()
760 current->comm, task_pid_nr(current)); in watchdog_timer_fn()
799 hrtimer->function = watchdog_timer_fn; in watchdog_enable()
805 /* Enable the hardlockup detector */ in watchdog_enable()
937 * lockup_detector_soft_poweroff - Interface to stop lockup detector(s)
960 * caller | table->data points to | 'which'
961 * -------------------|----------------------------------|-------------------------------
964 * -------------------|----------------------------------|-------------------------------
966 * -------------------|----------------------------------|-------------------------------
972 int err, old, *param = table->data; in proc_watchdog_common()
1012 return -ENOTSUPP; in proc_nmi_watchdog()
1190 if (ret == -ENODEV) in lockup_detector_delay_init()
1205 * lockup_detector_retry_init - retry init lockup detector if possible.