Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\hung_task.c Create Date:2022-07-28 11:45:05
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:check_hung_task

Proto:static void check_hung_task(struct task_struct *t, unsigned long timeout)

Type:void

Parameter:

TypeParameterName
struct task_struct *t
unsigned longtimeout
90  switch_count = Context switch counts: + nivcsw
96  If Value for the false possibility is greater at compile time( Per task flags (PF_*), defined further below: & (Frozen for system suspend | Freezer should not count it as freezable )) Then Return
104  If Value for the false possibility is greater at compile time(!switch_count) Then Return
107  If switch_count != last_switch_count Then
108  last_switch_count = switch_count
109  last_switch_time = jiffies
110  Return
112  If ime_is_after_jiffies(a) return true if a is after jiffies (last_switch_time + timeout * HZ) Then Return
115  trace_sched_process_hang(t)
117  If Should we panic (and reboot, if panic_timeout= is set) when a* hung task is detected: Then
118  console_verbose()
119  hung_task_show_lock = true
120  hung_task_call_panic = true
127  If sysctl_hung_task_warnings Then
128  If sysctl_hung_task_warnings > 0 Then sysctl_hung_task_warnings--
130  pr_err("INFO: task %s:%d blocked for more than %ld seconds.\n", * executable name, excluding path. * - normally initialized setup_new_exec() * - access it with [gs]et_task_comm() * - lock it with task_lock(), process id, (jiffies - last_switch_time) / HZ)
132  pr_err(" %s %s %.*s\n", print_tainted - return a string to represent the kernel taint state.* For individual taint flag meanings, see Documentation/admin-guide/sysctl/kernel.rst* The string is overwritten by the next call to print_tainted(),* but is always NULL terminated., release, (int)strcspn - Calculate the length of the initial substring of @s which does not contain letters in @reject*@s: The string to be searched*@reject: The string to avoid, version)
136  pr_err("\"echo 0 > /proc/sys/kernel/hung_task_timeout_secs\" disables this message.\n")
138  sched_show_task(t)
139  hung_task_show_lock = true
142  h_nmi_watchdog - restart NMI watchdog timeout.* If the architecture supports the NMI watchdog, touch_nmi_watchdog()* may be used to reset the timeout - for code which intentionally* disables interrupts for a long time. This call is stateless.
Caller
NameDescribe
check_hung_uninterruptible_tasksCheck whether a TASK_UNINTERRUPTIBLE does not get woken up for* a really long time (120 seconds). If that happens, print out* a warning.