Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__delayacct_add_tsk

Proto:int __delayacct_add_tsk(struct taskstats *d, struct task_struct *tsk)

Type:int

Parameter:

TypeParameterName
struct taskstats *d
struct task_struct *tsk
92  task_cputime(tsk, & utime, & stime)
93  tmp = cpu "wall-clock" running time * On some architectures, value will adjust for cpu time stolen * from the kernel in involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero sile
94  tmp += utime + stime
95  cpu "wall-clock" running time * On some architectures, value will adjust for cpu time stolen * from the kernel in involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero sile = If tmp < cpu "wall-clock" running time * On some architectures, value will adjust for cpu time stolen * from the kernel in involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero sile Then 0 Else tmp
97  task_cputime_scaled(tsk, & utimescaled, & stimescaled)
98  tmp = scaled cpu_run_real_total
99  tmp += utimescaled + stimescaled
100  scaled cpu_run_real_total = If tmp < scaled cpu_run_real_total Then 0 Else tmp
107  t1 = pcount
108  t2 = run_delay
109  t3 = sum_exec_runtime
111  Delay waiting for cpu, while runnable * count, delay_total NOT updated atomically += t1
113  tmp = cpu_delay_total + t2
114  cpu_delay_total = If tmp < cpu_delay_total Then 0 Else tmp
116  tmp = cpu "virtual" running time * Uses time intervals seen by the kernel i.e. no adjustment * for kernel's involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero silently on over + t3
117  cpu "virtual" running time * Uses time intervals seen by the kernel i.e. no adjustment * for kernel's involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero silently on over = If tmp < cpu "virtual" running time * Uses time intervals seen by the kernel i.e. no adjustment * for kernel's involuntary waits due to virtualization. * Value is cumulative, in nanoseconds, without a corresponding count * and wraps around to zero silently on over Then 0 Else tmp
122  raw_spin_lock_irqsave( & lock, flags)
123  tmp = blkio_delay_total + blkio_delay
124  blkio_delay_total = If tmp < blkio_delay_total Then 0 Else tmp
125  tmp = swapin_delay_total + swapin_delay
126  swapin_delay_total = If tmp < swapin_delay_total Then 0 Else tmp
127  tmp = freepages_delay_total + freepages_delay
128  freepages_delay_total = If tmp < freepages_delay_total Then 0 Else tmp
129  tmp = thrashing_delay_total + thrashing_delay
130  thrashing_delay_total = If tmp < thrashing_delay_total Then 0 Else tmp
131  Delay waiting for synchronous block I/O to complete * does not account for delays in I/O submission += blkio_count
132  Delay waiting for page fault I/O (swap in only) += swapin_count
133  Delay waiting for memory reclaim += freepages_count
134  Delay waiting for thrashing page += thrashing_count
135  raw_spin_unlock_irqrestore( & lock, flags)
137  Return 0