Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Create a new CPU accounting group

Proto:static struct cgroup_subsys_state *cpuacct_css_alloc(struct cgroup_subsys_state *parent_css)

Type:struct cgroup_subsys_state

Parameter:

TypeParameterName
struct cgroup_subsys_state *parent_css
63  If Not parent_css Then Return css
66  ca = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
67  If Not ca Then Go to out
70  cpuusage holds pointer to a u64-type object on every CPU = alloc_percpu(structcpuacct_usage)
71  If Not cpuusage holds pointer to a u64-type object on every CPU Then Go to out_free_ca
74  cpustat = alloc_percpu(structkernel_cpustat)
75  If Not cpustat Then Go to out_free_cpuusage
78  Return css
80  out_free_cpuusage :
81  free previously allocated percpu memory
82  out_free_ca :
83  free previously allocated memory
84  out :
85  Return ERR_PTR( - ENOMEM)