Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:allocate buffer for swap_cgroup.

Proto:static int swap_cgroup_prepare(int type)

Type:int

Parameter:

TypeParameterName
inttype
45  ctrl = swap_cgroup_ctrl[type]
47  When idx < length cycle
48  page = alloc_page(GFP_KERNEL | __GFP_ZERO)
49  If Not page Then Go to not_enough_page
51  map[idx] = page
53  If Not (idx % SWAP_CLUSTER_MAX) Then cond_resched()
56  Return 0
57  not_enough_page :
58  max = idx
59  When idx < max cycle __free_page(map[idx])
62  Return -ENOMEM
Caller
NameDescribe
swap_cgroup_swapon