Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:alloc_mem_cgroup_per_node_info

Proto:static int alloc_mem_cgroup_per_node_info(struct mem_cgroup *memcg, int node)

Type:int

Parameter:

TypeParameterName
struct mem_cgroup *memcg
intnode
4832  tmp = node
4841  If Not node_state(node, N_NORMAL_MEMORY) Then tmp = -1
4843  pn = kzalloc_node - allocate zeroed memory from a particular memory node.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).*@node: memory node from which to allocate
4844  If Not pn Then Return 1
4847  Legacy local VM stats = alloc_percpu(structlruvec_stat)
4848  If Not Legacy local VM stats Then
4849  kfree(pn)
4850  Return 1
4853  Subtree VM stats (batched updates) = alloc_percpu(structlruvec_stat)
4854  If Not Subtree VM stats (batched updates) Then
4855  free previously allocated percpu memory
4856  kfree(pn)
4857  Return 1
4860  lruvec_init( & lruvec)
4861  Set to the value by which = 0
4862  he soft limit is exceeded = false
4863  Back pointer, we cannot = memcg
4865  nodeinfo[node] = pn
4866  Return 0
Caller
NameDescribe
mem_cgroup_alloc