Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Account system CPU time to a process.*@p: the process that the CPU time gets accounted to*@hardirq_offset: the offset to subtract from hardirq_count()*@cputime: the CPU time spent in kernel space since the last update

Proto:void account_system_time(struct task_struct *p, int hardirq_offset, u64 cputime)

Type:void

Parameter:

TypeParameterName
struct task_struct *p
inthardirq_offset
u64cputime
188  If Per task flags (PF_*), defined further below: & I'm a virtual CPU && irq_count() - hardirq_offset == 0 Then
189  Account guest CPU time to a process.*@p: the process that the CPU time gets accounted to*@cputime: the CPU time spent in virtual machine since the last update
190  Return
193  If hardirq_count() - hardirq_offset Then index = CPUTIME_IRQ
195  Else if in_serving_softirq() Then index = CPUTIME_SOFTIRQ
197  Else index = CPUTIME_SYSTEM
200  Account system CPU time to a process and desired cpustat field*@p: the process that the CPU time gets accounted to*@cputime: the CPU time spent in kernel space since the last update*@index: pointer to cpustat field that has to be updated
Caller
NameDescribe
account_process_tickAccount a single tick of CPU time.*@p: the process that the CPU time gets accounted to*@user_tick: indicates if the tick is a user or a system tick