Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__account_scheduler_latency - record an occurred latency*@tsk - the task struct of the task hitting the latency*@usecs - the duration of the latency in microseconds*@inter - 1 if the sleep was interruptible, 0 if uninterruptible* This function is the main

Proto:void __sched __account_scheduler_latency(struct task_struct *tsk, int usecs, int inter)

Type:void

Parameter:

TypeParameterName
struct task_struct *tsk
intusecs
intinter
158  If inter && usecs > 5000 Then Return
163  If usecs <= 0 Then Return
166  memset( & lat, 0, size of lat )
167  count = 1
168  time = usecs
169  max = usecs
171  stack_trace_save_tsk - Save a task stack trace into a storage array*@task: The task to examine*@store: Pointer to storage array*@size: Size of the storage array*@skipnr: Number of entries to skip at the start of the stack trace
173  raw_spin_lock_irqsave( & latency_lock, flags)
175  account_global_scheduler_latency(tsk, & lat)
177  When i < latency_record_count cycle
179  same = 1
181  mylat = latency_record[i]
182  When q < LT_BACKTRACEDEPTH cycle
183  record = backtrace[q]
185  If backtrace[q] != record Then
186  same = 0
187  Break
191  If Not record Then Break
194  If same Then
195  count++
196  time += time
197  If time > max Then max = time
199  Go to out_unlock
206  If latency_record_count >= LT_SAVECOUNT Then Go to out_unlock
210  i = latency_record_count++
211  No 3D Now!( & latency_record[i], & lat, size of latency_record )
213  out_unlock :
214  raw_spin_unlock_irqrestore( & latency_lock, flags)